|
You last visited: Today at 22:13
Advertisement
AutoHotkey problem
Discussion on AutoHotkey problem within the General Coding forum part of the Coders Den category.
01/27/2007, 00:49
|
#1
|
elite*gold: 0
Join Date: Mar 2006
Posts: 98
Received Thanks: 9
|
Edit: Look @ post #7
Well here's my code:
;WinGet,id, ID,[Conquer2.0]
Gui, Add, Text,, For
Gui, Add, Text,x10 y42 w100 h20, Auto-summon-guard.
Gui, Add, Text,x15 y62 w190 h20, To start, press F10 on active window,
Gui, Add, Text,x65 y82 w150 h20, now press Ok
Gui, Add, Button, x150 y102 w60 h20 vButton gStart, Ok
Gui, Add, Text,x55 y122 w100 h20, v1.0 by Diabox
Gui, Show
return
Start:
Gui, Submit, Hide
;MsgBox, To start press F10 on active window`n`n Beta version`n v1.0 by Diabox `n`n special for  community
;#NoTrayIcon
*F10::
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, Started
loop
{
;ControlSend,,F6,ahk_id %id%
ControlClick,ahk_id %id%,,RIGHT
ControlSend,,F5,ahk_id %id%
Sleep, 60000
}
*F11::ExitApp
;GuiClose:
return
it's supposed to press f6, then right click and then press f5 and then wait 60 seconds to perform the same thing again. But it doesn't work, anyone knows why it doesn't work? I'm quite a nuub with autohotkey.
|
|
|
01/28/2007, 21:26
|
#2
|
elite*gold: 0
Join Date: Aug 2005
Posts: 896
Received Thanks: 334
|
i think it should be more like this:
Code:
ControlSend,,{F6},ahk_id %id%
ControlClick,,ahk_id %id%,,RIGHT
ControlSend,,{F5},ahk_id %id%
Note the {} around the function keys, and the additional comma after ControlClick.
|
|
|
01/28/2007, 21:56
|
#3
|
elite*gold: 0
Join Date: Mar 2006
Posts: 98
Received Thanks: 9
|
Quote:
Originally posted by mr.rattlz@Jan 28 2007, 21:26
i think it should be more like this:
Code:
ControlSend,,{F6},ahk_id %id%
ControlClick,,ahk_id %id%,,RIGHT
ControlSend,,{F5},ahk_id %id%
Note the {} around the function keys, and the additional comma after ControlClick.
|
Not working
|
|
|
01/29/2007, 05:59
|
#4
|
elite*gold: 0
Join Date: Jan 2006
Posts: 17
Received Thanks: 0
|
Quote:
Originally posted by Diabox@Jan 26 2007, 15:49
Well here's my code:
;WinGet,id, ID,[Conquer2.0]
Gui, Add, Text,, For
Gui, Add, Text,x10 y42 w100 h20, Auto-summon-guard.
Gui, Add, Text,x15 y62 w190 h20, To start, press F10 on active window,
Gui, Add, Text,x65 y82 w150 h20, now press Ok
Gui, Add, Button, x150 y102 w60 h20 vButton gStart, Ok
Gui, Add, Text,x55 y122 w100 h20, v1.0 by Diabox
Gui, Show
return
Start:
Gui, Submit, Hide
;MsgBox, To start press F10 on active window`n`n Beta version`n v1.0 by Diabox `n`n special for community
;#NoTrayIcon
*F10::
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, Started
loop
{
;ControlSend,,F6,ahk_id %id%
ControlClick,ahk_id %id%,,RIGHT
ControlSend,,F5,ahk_id %id%
Sleep, 60000
}
*F11::ExitApp
;GuiClose:
return
it's supposed to press f6, then right click and then press f5 and then wait 60 seconds to perform the same thing again. But it doesn't work, anyone knows why it doesn't work? I'm quite a nuub with autohotkey.
|
This is a guess but remove the semicolon in front of the line
;ControlSend,,F6,ahk_id %id%
make the line this if that does not work
ControlSend,,{F6},ahk_id %id%
let me know if this helps
i dont use controlSend i just use send and it works for me but let me know. Same mod for all the fkey sends enclose them in {}
Don
|
|
|
01/29/2007, 13:00
|
#5
|
elite*gold: 0
Join Date: Mar 2006
Posts: 98
Received Thanks: 9
|
Quote:
Originally posted by dlerch+Jan 29 2007, 05:59--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (dlerch @ Jan 29 2007, 05:59)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--Diabox@Jan 26 2007, 15:49
Well here's my code:
;WinGet,id, ID,[Conquer2.0]
Gui, Add, Text,, For
Gui, Add, Text,x10 y42 w100 h20, Auto-summon-guard.
Gui, Add, Text,x15 y62 w190 h20, To start, press F10 on active window,
Gui, Add, Text,x65 y82 w150 h20, now press Ok
Gui, Add, Button, x150 y102 w60 h20 vButton gStart, Ok
Gui, Add, Text,x55 y122 w100 h20, v1.0 by Diabox
Gui, Show
return
Start:
Gui, Submit, Hide
;MsgBox, To start press* F10 on active window`n`n Beta version`n* * v1.0* by Diabox `n`n special for community
;#NoTrayIcon
*F10::
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, Started
loop
{
* ;ControlSend,,F6,ahk_id %id%
* ControlClick,ahk_id %id%,,RIGHT
* ControlSend,,F5,ahk_id %id%
* Sleep, 60000
}
*F11::ExitApp*
;GuiClose:
return
it's supposed to press f6, then right click and then press f5 and then wait 60 seconds to perform the same thing again. But it doesn't work, anyone knows why it doesn't work? I'm quite a nuub with autohotkey.
|
This is a guess but remove the semicolon in front of the line
;ControlSend,,F6,ahk_id %id%
make the line this if that does not work
ControlSend,,{F6},ahk_id %id%
let me know if this helps
i dont use controlSend i just use send and it works for me but let me know. Same mod for all the fkey sends enclose them in {}
Don [/b][/quote]
When you use send it won't work in background now will it?? I dunno... But if you read mr. rattlz reply you saw he already mentioned removing the ; etc. and putting { } around the F-keys and that didn't work  , I feel like a noob. Oh wait, I am.
|
|
|
01/30/2007, 07:29
|
#6
|
elite*gold: 0
Join Date: Jan 2006
Posts: 17
Received Thanks: 0
|
Quote:
Originally posted by Diabox+Jan 29 2007, 04:00--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Diabox @ Jan 29 2007, 04:00)</td></tr><tr><td id='QUOTE'>
Quote:
Originally posted by -dlerch@Jan 29 2007, 05:59
<!--QuoteBegin--Diabox
|
Quote:
@Jan 26 2007, 15:49
Well here's my code:
;WinGet,id, ID,[Conquer2.0]
Gui, Add, Text,, For
Gui, Add, Text,x10 y42 w100 h20, Auto-summon-guard.
Gui, Add, Text,x15 y62 w190 h20, To start, press F10 on active window,
Gui, Add, Text,x65 y82 w150 h20, now press Ok
Gui, Add, Button, x150 y102 w60 h20 vButton gStart, Ok
Gui, Add, Text,x55 y122 w100 h20, v1.0 by Diabox
Gui, Show
return
Start:
Gui, Submit, Hide
;MsgBox, To start press F10 on active window`n`n Beta version`n v1.0 by Diabox `n`n special for community
;#NoTrayIcon
*F10::
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, Started
loop
{
;ControlSend,,F6,ahk_id %id%
ControlClick,ahk_id %id%,,RIGHT
ControlSend,,F5,ahk_id %id%
Sleep, 60000
}
*F11::ExitApp
;GuiClose:
return
it's supposed to press f6, then right click and then press f5 and then wait 60 seconds to perform the same thing again. But it doesn't work, anyone knows why it doesn't work? I'm quite a nuub with autohotkey.
|
This is a guess but remove the semicolon in front of the line
;ControlSend,,F6,ahk_id %id%
make the line this if that does not work
ControlSend,,{F6},ahk_id %id%
let me know if this helps
i dont use controlSend i just use send and it works for me but let me know. Same mod for all the fkey sends enclose them in {}
Don
|
When you use send it won't work in background now will it?? I dunno... But if you read mr. rattlz reply you saw he already mentioned removing the ; etc. and putting { } around the F-keys and that didn't work  , I feel like a noob. Oh wait, I am. [/b][/quote]
I didnt see Mr Rattles reply. I may have been typing my response or I may have just missed it. I doubt send will send to the background window. Im going to enclose a little script i use. It is not pretty or well documented but it maybe helpful.
;settimer arrows, 24000
^2:: settimer arrows, off
^3:: settimer arrows, 24000
XButton1::F1
XBUTTON2::
send {F2}
return
^1::gosub co
#v::gosub vnc
^t::
WinClose, A
Gosub co
return
#q::
Send {LCtrl down}
Return
#e::
Send {RButton down}
Return
~RButton::
;_ClickCount=0
Loop
{
Sleep 60
GetKeyState, RButtonState, RButton, P
if RButtonState = U
break
else
MouseClick, Right
;_ClickCount++
;If (_ClickCount = 15)
; Send, {F2}
}
return
co:
run C:\Program Files\Conquer 2.0\play.exe, C:\Program Files\Conquer 2.0\
Return
vnc:
run C:\Program Files\RealVNC\VNC4\vncviewer.exe
WinWait, VNC Viewer : Connection Details,
IfWinNotActive, VNC Viewer : Connection Details, , WinActivate, VNC Viewer : Connection Details,
WinWaitActive, VNC Viewer : Connection Details,
MouseClick, left, 213, 104
Sleep, 100
WinWait, VNC Viewer : Authentication [No Encryption],
IfWinNotActive, VNC Viewer : Authentication [No Encryption], , WinActivate, VNC Viewer : Authentication [No Encryption],
WinWaitActive, VNC Viewer : Authentication [No Encryption],
MouseClick, left, 203, 75
Sleep, 100
Send, deleted_for_my_safety
MouseClick, left, 324, 43
Sleep, 100
return
arrows:
send {f2}
return
This all works mainly because I am lazy it is a combination of stuff for an archer. It repacks arrows and can do a few other odds and ends. I am mainly posting it to illustrate syntax. Ignore the ;lines. I didnt edit this to make it pretty. I will try and help anyway I can because EPVP has given a lot to me but I am not a programer just a lousy hacking and scripter. Good Luck
|
|
|
01/30/2007, 14:11
|
#7
|
elite*gold: 0
Join Date: Mar 2006
Posts: 98
Received Thanks: 9
|
I still can't get it to work, anyone around with some ideas?
Edit: I've re-written my script:
;WinGet,id, ID,[Conquer2.0]
Gui, Add, Text,, For
Gui, Add, Text,x10 y42 w100 h20, Auto-summon-guard.
Gui, Add, Text,x15 y62 w190 h20, To start, press F10 on active window,
Gui, Add, Text,x65 y82 w150 h20, now press Ok
Gui, Add, Button, x150 y102 w60 h20 vButton gStart, Ok
Gui, Add, Text,x55 y122 w100 h20, v1.0 by Diabox
Gui, Show
return
Start:
Gui, Submit, Hide
;MsgBox, To start press F10 on active window`n`n Beta version`n v1.0 by Diabox `n`n special for  community, with help fromvarza1999
;#NoTrayIcon
*F10::
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, ...started
ControlClick,ahk_id %id%,,RIGHT
loop
{
loop
{
Sleep, 60000 ; xxxx ms delay
ControlClick, x320 y766,ahk_id %id%,,RIGHT ; f6 key summonguard is put on it
ControlClick, x500 y350,ahk_id %id%,,RIGHT ; rightclicks on the screen to summon
ControlClick, x276 y766,ahk_id %id%,,RIGHT ; f5 to select tornado again
}
}
*F11::ExitApp
p::Pause
;GuiClose:
return
But it still does nothing, this time I make it click on the places where the hotkeys are located (like I did in my archer macro which actually worked  )
|
|
|
02/10/2007, 08:02
|
#8
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
i didnt read much about ur script, but here is my version
; <COMPILER: v1.0.46.8>
Gui, Add, Text,, Skill trainner - 800x600
Gui, Add, Text,x10 y22 w150 h20, Put F1 for skill:
Gui, Add, Text,x10 y42 w80 h20, Put F2 for Skill:
Gui, Add, Text,x10 y62 w80 h20, Put F3 for Sit:
Gui, Add, Text,x10 y80 w190 h20, Press F11 to Stop
Gui, Add, Button, x150 y92 w60 h20 vButton gStart, Ok
Gui, Show
return
Start:
Gui, Submit, Hide
WinGet,id, ID,[Conquer2.0]
gata := false
MsgBox, Press F11 to Pause
ControlClick, x150 y573,ahk_id %id%,,RIGHT
loop
{
ControlClick, x200 y573,ahk_id %id%,,RIGHT
sleep,1000
ControlClick, x114 y573,ahk_id %id%,,RIGHT
sleep,1000
ControlClick, x150 y573,ahk_id %id%,,RIGHT
sleep,1000
ControlClick, x200 y573,ahk_id %id%,,RIGHT
sleep,1000
ControlClick, x400 y300,ahk_id %id%,,RIGHT
sleep,1000
}
*F11::Pause
return
|
|
|
 |
Similar Threads
|
[HELP]Autohotkey
06/11/2011 - AutoIt - 8 Replies
Hallu, elitepvpers! ichh habe gaanz kur ne frage, wo ich es echt nich raffe, habe schon sufu benutzt und gegoogelt, aber nix gefunden, außer die normale anleitung auf english, die ich iwie nich raffe; kann mir wer bei autoit in diesen"noob" script autohotkey einbauen, damit der bot wenn ich auf F7 klicke automatisch beenden!
hier der "noob" script!
while 1
sleep(500)
mousemove(1191,109,0)
sleep(200)
mouseclick("right")
sleep(200)
mousemove(1235,186,0)
|
Mysteriöses AutoIT/Autohotkey Problem
07/02/2010 - World of Warcraft - 10 Replies
Hallo zusammen,
habe seit geraumer Zeit ein Problem mit den genannten Programmen. Es geht darum das meine Scripts im WoW Client garkeine Wirkung zeigen, auf dem Desktop und bei !Ende aber mysteriöser Weise laufen.. Es handelt sich um ein simples AFK Makro was ich früher schonmal genutzt habe, heute aber irgendwie nicht mehr funktioniert. Ich benutze Windows 7 Ultimate x64. Starte WoW immer als Administrator das hat den Grund, dass sonst meine Einstellungen vom Client nicht gespeichert werden....
|
AutoHotKey Help
02/16/2010 - CO2 Programming - 2 Replies
I just started using ahk the other day to try and make a bot for the lab and everything is ok except that my char tends to chase monsters and end up away from the spawn.
Just wondering if anyone could share some advice on how I could select or input a coord. within conquer so that my char would return to that spot periodically thus remaining more or less in one spot on the map.
I've attached what I have so far. I tried to remedy the wandering by adding a down jump if no monsters are...
|
AutoHotKey Help?
12/06/2007 - Conquer Online 2 - 11 Replies
I have Read the "Help" File but still cant figure out how to make a macro that works on client 1 while playing on client 2. Any ideas or codes for this :confused:
I'm working on a macro that heals/pots/sits/med/stig/dc/area to macro etc.
Pretty much it will play the game for u :D
|
Help with AutoHotKey
03/24/2006 - Conquer Online 2 - 3 Replies
Hey everyone i need some help. does anyone know how to write a command where you hold down ctrl while mouse clicking? all i've managed to do so far is make it click ctrl, let go, then mouse click. anyone know the codes to how i can do them both together? thanks.
shadowHacker
|
All times are GMT +1. The time now is 22:13.
|
|