Help - Search - Members - Calendar
Full Version: simple fix
AC Tools Everything Macro > AC Tool Macros > Other Macros
kiyokan
hello i am new here i have been trying to get my macro to work but i cant seem to get it to run just right i want to be able to hit the space bar and move the mouse to those xy cords and keep doing it till i alt f4 the macro but i have no idea of what im doing. thanks for ne help given.

Constants
click = 0
end
Procedure click
keydown {SPACE} SetConst click = click + 2
if $click > 1
LeftClick
DragTo 311, 256
click = click - 2
MousePos 373, 514
end
end

current prob runs for 31 milli sec and dose not keep working.
actooldude
QUOTE(kiyokan @ Dec 29 2008, 05:36 AM) *
hello i am new here i have been trying to get my macro to work but i cant seem to get it to run just right i want to be able to hit the space bar and move the mouse to those xy cords and keep doing it till i alt f4 the macro but i have no idea of what im doing. thanks for ne help given.

Constants
click = 0
end
Procedure click
keydown {SPACE} SetConst click = click + 2
if $click > 1
LeftClick
DragTo 311, 256
click = click - 2
MousePos 373, 514
end
end

current prob runs for 31 milli sec and dose not keep working.


I can't really imagine what you are attempting to do but I can give an idea why the macro doesnt run. While you have defined the procedure called "click", you havent actually run it.

You run proedures with the word Call, ie Call Click will call your procedure once only.

If you want to run your procedure cionsatntly until you stop it, try this ...

Constants
click = 0
run = 1
end

Procedure click
keydown {SPACE} SetConst click = click + 2
if $click > 1
LeftClick
DragTo 311, 256
click = click - 2
MousePos 373, 514
end
end

while $run = 1
call click
end


As I said earlier, I can't say this code will work because I'm not sure what you want, but it will run infinately until you stop it.
Bear
QUOTE(actooldude @ Jan 5 2009, 10:49 AM) *
QUOTE(kiyokan @ Dec 29 2008, 05:36 AM) *
i want to be able to hit the space bar and move the mouse to those xy cords and keep doing it till i alt f4 the macro.

Constants
click = 0
end
Procedure click
keydown {SPACE} SetConst click = click + 2
if $click > 1
LeftClick
DragTo 311, 256
click = click - 2
MousePos 373, 514
end
end

current prob runs for 31 milli sec and dose not keep working.


I can't really imagine what you are attempting to do but I can give an idea why the macro doesnt run. While you have defined the procedure called "click", you havent actually run it.

As I said earlier, I can't say this code will work because I'm not sure what you want, but it will run infinately until you stop it.


Most Likely reason is that the Value of Click never changes from Zero. Keydown and SetConst on same line: ERROR!! No SetConst defined for "Click = Click - 2"
Why add 2 then subtract 2? Why not have the IF statement > 0, that way yiou can use the INC and DEC commands, or Not even use the IF statemnent. Your gonna use the Alt-F4 to stop the macro or the program your trying to Macro? lol Look into using {GlobalKeys} for starting and stopping the Macro.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.