kk im a newbie at makin bots but heres the code i have now...
okay im a TOTAL newb at making stuff with autoit, so far i can only make simple things with clicking and what not...but i ran into a problem today. my bot creates a gui that instructs you on how to use the bot, what i need help with is how to create a hotkey that "Starts" the bot(the opposite of the exiting hotkey)
HotKeySet("^!x", "QuitProg")
Func QuitProg()
Exit
EndFunc
thats the exit hotkey that i got, but i was wondering if its possible to reverse it, and have a 2nd code like dat but it starts instead of exits....ty
From what I know of Win32, you have to handle the WM_COMMAND message for the button.(Windows will throw the message when the button is pushed) You'll have to assign the buttons ID and etc, and when you handle the WM_COMMAND message, check if it's the ID of the button and then execute your next code.
Don't ask how to do it in AutoIt though...
Edit:: Woah, you totally changed the first post....
I dunno anything about AutoIt so I guess ask swords or Hiyoal..
rofl thanks for trying to help but you Totally lost me, it seems like it should be simple as hell becuase its just simply like this:
Person clicks the button then it should endswitch/closewindow and then move onto the next line..wich is the bot
no, ctrl+alt+x = exit script
and, ctrl+alt+z = start
i was thinking..is there a way that when you start the script from clicking it, it automatically pauses the script untill a hotkey is executed such as my "start"(ctr+alt+z)??
okay well since your here now and your wonderfull help i hope you wouldnt mind awnser another question at the same time :P
but heres my script
This script is to where a msg pops up with instructions, you minimize it and then press the hotkey CTRL+ALT+Z,(Idont have that part in yet becuase i dont know how to make it)
the problem with this bot is that when i click the button nothing happends, the "Window(gui)" that pops up dosnt go away when i click on $Button1 AkA Start...i dont know how to make it move onto the next part of the script thnx 4 ure help
When the button is clicked, $checker is set to "1" and then the function "StartFunc" is called because in the:
While 1
Wend
loop, it checks to see if $checker=1 and will keep on running until the button on the GUI is pressed again.
Because, when $x=1 when button1 is pressed, it checks to see what $checker is and if it is 0 then it starts the bot, otherwise it see's whether $checker=1 and if it is then it makes it ="0" and will skip the:
oh snap, im not gonna lie i dont understand half of that. but from what i do understand, i understand what you did with the ctrl+alt+z, i also found out another way for this to work..
PHP Code:
Case $Button1
GUISetState(@SW_HIDE)
EndSwitch
WEnd
so basically once they click start it just hides the gui and stops the switch, and they go on to pressing ctrl+alt+z to start the bot...! right? lol
Btw is there a way that i can loop this function, after you click ctrl+alt+z
sorry if i wasted your time, id rather do it this way becuase i actually understand it sort of lol :x
Case $button1 GUISetState(@SW_HIDE) StartProg() EndSwitch Wend
Hiyoal
<edit>
Yes you can:
Declare Global $checker=0 at the start of your script
PHP Code:
Func StartProg() if $checker=1 then $checker=0 elseif $checker=0 Then $checker=1 endIf While $checker=1 MouseClick("left" , 578, 388, 2, 1) Sleep(1200) MouseClick("right" , 635, 457, 1, 1) Sleep(1200) MouseClick("left" , 697, 387, 2, 1) Send("{F3}") Sleep(6000) Wend EndFunc
This checks and see's whether $checker=1 or 0. If it equals to 0 then it makes $checker=1 and the while loop starts because $checker=1. When the hotkey is pressed again $checker=1 so it makes $checker=0 and the while stops, because While only runs when $checker=1.
oky fixed my hotkey situation Thanks alot Hiyoal, i spent a long time on this last nightl; just trying to get the gui function to work, it now works exacally how i want it, when i repost it ill make sure to give you credit
autoit function alle x minuten ausführen 05/02/2010 - AutoIt - 6 Replies Hallo, ist es möchlich eine funktion alle x minuten auszuführen und gleichzeitig das programm weiter laufen zu lassen
also sowas in der art
blabla() ;funktion soll alle 2 sekunden ausgeführt werden
blub() ; funktion soll alle 4 sekunden ausgeführt werden
MfG Lukas
guild function button 10/23/2009 - Dekaron - 3 Replies im still crashing when i mouse over he function button in my guild, our yall still having the same problem? because i have uber amount of AP im wanting to donate. And if ur having same problem, know when the will get around to fixing it?
Need help to add 2 Function in bot build on Autoit 09/13/2009 - AutoIt - 6 Replies Hey All,
How are you..?! Hope be good
I wanna help to add 2 Function in bot build on Autoit
The bot which i need to add on it at attachment
This bot maked Bywildspirit n this topic of bot here
So i ask if any one can help me to add function that stop this Bot after 3h ..? (i mean like Timer)(It's like Howl interval in this bot)
Coz i hate to take spwen to myself only By using Auto Howl Although my bag Full.
-Press ctrl+a (always) coz auto grab is very slow..
PLz Bro if Any one...
AutoIt Button 04/17/2008 - General Coding - 1 Replies Hi,
ich habe mir mal nen pickup bot erstellt
mit nem button der funct aber ich möchte noch ein button hinzufügen für AutoSend und Fish Bot
Und so habe ich mein erster Butto erstellt aber ich gebe genau das gleiche ein aber es kommt kein 2 button warumP?
Und ich möchte halt noch nen buton erstellen das der pick up ausgeht wie geht das??
------------------------------------------------
#include <GUIConstants.au3>
GUICreate("AmelieMaus Hack")
Autoit function 03/17/2008 - Silkroad Online - 0 Replies I'm just looking to write a quick autoit script so I can auto-ress if I need to delvl someone. It's my first time using autoit ^^
I found the Sleep (#) code to wait, but what is the code to select a skill?
I also would like to know how I can make the program loop until I press a button to end it.
I've looked around and used the search button, but I don't see any codes posted here, only the programs. Thx for anyone who can help me :D