DragoooN Posted February 5, 2009 Share Posted February 5, 2009 Hi there! im using hotkeys, i got hotkey on number 1 to 9 and on some buttons like q,w, a, s, d and f I got the hotkeys to give command to click there its choosed and write in a link then press enter 2 times. This is an easier and faster way to play this game impulse im playing (swedish "click" game). And its legal, and i will also public my program when its done in theirs forum. Problem with this is that when i try it now its go to the place and type in the link, the whole link isn't typed before it clicks again and type the link, over and over again! Hard to close even if i have hotkey on that {ESC} key i got it on. I was delete every HotKey expect one that i keeped, i run it and that is working! BUT as fast i make alot more its going crazy >_> My question is.. WHY? 1 of these codes under a hotkey function Func Fri() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=vakter&q=fri") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc Link to comment Share on other sites More sharing options...
sandin Posted February 5, 2009 Share Posted February 5, 2009 maybe you can add SLEEP(xxx) between SEND functions, or increase Opt("SendKeyDelay", xxx) (I bet you're using dual/quad core CPU, cuz the same thing happened to me with dual core CPU) Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
AlmarM Posted February 5, 2009 Share Posted February 5, 2009 Mayby you should take a look at '_IsPressed'. AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 Whats that _IsPressed !!?!? >_>And btw, i know now that only 1 hotkey is working also..THIS is how the code looks now;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Programmed by HaZeL;;;;;;;;;;;;;;;;;;;;;;;;;;;;To Impulse.nu;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Global $PausedHotKeySet("{PAUSE}", "Pause")HotKeySet("{ESC}", "Quit")HotKeySet("{SPACE}", "Cord");JobbHotKeySet("{1}", "Bensinmack")HotKeySet("{2}", "Bank");EnergifrukterHotKeySet("{q}", "N1")HotKeySet("{w}", "N2");ETCHotKeySet("{a}", "Fri");-----------------------------------------------------------------------------------;BÖRJA KODERNA EFTER DENNA LINJE! (Här uppe ska bara hotkeysets funktioner vara inklusive Global);-----------------------------------------------------------------------------------$set = 0While 1$pos = MouseGetPos()$var = Tooltip( $pos[0] & ", " & $pos[1],0,0, "Position")Sleep(100)if $set = 1 then GoGoGo() EndIfWEndFunc GoGoGo()InputBox("Kordinater", "Skriv in kordinaterna för din Web Browser!",$pos[0] & ", " & $pos[1])Sleep(500)Tooltip("")While 1Sleep(100)WEndEndFunc$done = $pos;-----------------------------------------------------------------------------------;Hotkeys funktionerna här nere!;-----------------------------------------------------------------------------------Func Pause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Scriptet är pausad!',0,0,"Pausat") WEnd ToolTip("")EndFuncFunc Quit() ToolTip('Scriptet avslutas...',0,0,"Avslutas") Sleep(1000) ToolTip("") Exit 0EndFunc;JobbFunc Bensinmack()MouseClick("left", $done[0], $done[1])Send("http://impulse.nu/?sida=jobb/olagliga_jobb&q=bensinmack&p=redo")Send("{ENTER}")Sleep(300)Send("{ENTER}")EndFuncFunc Bank()MouseClick("left", $done[0], $done[1])Send("http://impulse.nu/?sida=jobb/olagliga_jobb&q=bank&p=redo")Send("{ENTER}")Sleep(300)Send("{ENTER}")EndFunc;EnergifrukterFunc N1()MouseClick("left", $done[0], $done[1])Send("http://impulse.nu/?sida=stan/frukter&kop=1")Send("{ENTER}")Sleep(300)Send("{ENTER}")EndFuncFunc N2()MouseClick("left", $done[0], $done[1])Send("http://impulse.nu/?sida=stan/frukter&kop=2")Send("{ENTER}")Sleep(300)Send("{ENTER}")EndFuncFunc Fri()MouseClick("left", $done[0], $done[1])Send("http://impulse.nu/?sida=vakter&q=fri")Send("{ENTER}")Sleep(300)Send("{ENTER}")EndFuncFunc Cord() $set = 1EndFunc Link to comment Share on other sites More sharing options...
sandin Posted February 5, 2009 Share Posted February 5, 2009 try adding: Opt("SendKeyDelay", 250) at the top of your script, if that's too slow, decrease the value. Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 try adding: Opt("SendKeyDelay", 250) at the top of your script, if that's too slow, decrease the value. I was just try it out! didn't work! And btw, last code i sent, was pretty wrong, i mean there it will be $pos instead of $done for the $done didn't work! I also think that its something wrong when i was write the code for $pos! BUT WHAT and how!? I was try that SendKeyDelay and it was type the whole link, then it was start over again! (and it was half lagging and pretty hard to close the program) Also whole right code i got now that not working ;S ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;Programmed by HaZeL;;;;;;;;;;;;;;; ;;;;;;;;;;;;;To Impulse.nu;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Global $Paused HotKeySet("{PAUSE}", "Pause") HotKeySet("{ESC}", "Quit") HotKeySet("{SPACE}", "Cord") ;Jobb HotKeySet("{1}", "Bensinmack") HotKeySet("{2}", "Bank") ;Energifrukter HotKeySet("{q}", "N1") HotKeySet("{w}", "N2") ;ETC HotKeySet("{a}", "Fri") ;----------------------------------------------------------------------------------- ;BÖRJA KODERNA EFTER DENNA LINJE! (Här uppe ska bara hotkeysets funktioner vara inklusive Global) ;----------------------------------------------------------------------------------- $set = 0 While 1 $pos = MouseGetPos() $var = Tooltip( $pos[0] & ", " & $pos[1],0,0, "Position") Sleep(100) if $set = 1 then GoGoGo() EndIf WEnd Func GoGoGo() InputBox("Kordinater", "Skriv in kordinaterna för din Web Browser!",$pos[0] & ", " & $pos[1]) Sleep(500) Tooltip("") While 1 Sleep(100) WEnd EndFunc $done = $pos ;----------------------------------------------------------------------------------- ;Hotkeys funktionerna här nere! ;----------------------------------------------------------------------------------- Func Pause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Scriptet är pausad!',0,0,"Pausat") WEnd ToolTip("") EndFunc Func Quit() ToolTip('Scriptet avslutas...',0,0,"Avslutas") Sleep(1000) ToolTip("") Exit 0 EndFunc ;Jobb Func Bensinmack() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=jobb/olagliga_jobb&q=bensinmack&p=redo") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc Func Bank() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=jobb/olagliga_jobb&q=bank&p=redo") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc ;Energifrukter Func N1() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=stan/frukter&kop=1") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc Func N2() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=stan/frukter&kop=2") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc Func Fri() MouseClick("left", $pos[0], $pos[1]) Send("http://impulse.nu/?sida=vakter&q=fri") Send("{ENTER}") Sleep(300) Send("{ENTER}") EndFunc Func Cord() $set = 1 EndFunc Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 ALSO! The thing that is wrong MUST be the $pos i dont know rly why i think so but i just do it! Because it work perfect if i only have one hotkey with the $pos in it! But if i make 2 or more it wont work!!!! WHY!? I dont know whats really wrong :S Someone who can just re-program it with the $pos!? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 5, 2009 Share Posted February 5, 2009 Use the _IE* UDF instead, it will work a million times better. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 Use the _IE* UDF instead, it will work a million times better.What you mean? Whats that?I'm not that experienced in AutoIT programming and those stuffs because i was start with AutoIT for like 4 days ago and just can some basics as you probly see.. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 5, 2009 Share Posted February 5, 2009 Check the helpfile! Read about the func's and run the examples, you won't get any spoon-feeding on this forum you gotta do something yourself! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 Check the helpfile! Read about the func's and run the examples, you won't get any spoon-feeding on this forum you gotta do something yourself!You can atleast explain wtf it is for type of function and what its doing and why etc.The helpfile got around 100000000000 maps Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 5, 2009 Share Posted February 5, 2009 Isn't it obvious? IE= Internet Explorer. So now you know what it is now give it a try yourself .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 Isn't it obvious? IE= Internet Explorer. So now you know what it is now give it a try yourselfI am using Internet Explorer already.And whats _IE* UDFThe _ and * UDFWell, i will anyway read now in the help file and might make a gui to it too if im good enough or if this language is to bad and i go back to VB Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 5, 2009 Share Posted February 5, 2009 You gotta be kidding me.... You haven't even opened the helpfile have you? Go to "User Defined Functions">"IE Management". I suggest you start with _IE_Introduction(). And before you say something else, think about this= If you spend a few minutes to learn the _IE*() funcs you will be able to run the script on every computer that exist that uses Win2000 to Win7 and have IE installed. Will you be able to do that with Send() and MouseClick()?? Hell no. Will you be able to do it in VB?? I don't know and I don't care, this is a forum for AutoIt. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Bert Posted February 5, 2009 Share Posted February 5, 2009 Look in the helpfile for IE.au3. Under the User Defined Functions, you will see a section called IE management. Read it, look at the examples, try a few things. It isn't hard. For only doing code for 4 days, you are picking it up rather quickly. A second thing to do is try AutoIt 1 2 3 The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
DragoooN Posted February 6, 2009 Author Share Posted February 6, 2009 You gotta be kidding me.... You haven't even opened the helpfile have you?Go to "User Defined Functions">"IE Management". I suggest you start with _IE_Introduction().And before you say something else, think about this= If you spend a few minutes to learn the _IE*() funcs you will be able to run the script on every computer that exist that uses Win2000 to Win7 and have IE installed. Will you be able to do that with Send() and MouseClick()?? Hell no. Will you be able to do it in VB?? I don't know and I don't care, this is a forum for AutoIt.LoL dude!Serious, i've check help file and i not find anything named IE Management :SBut also i was go to the example maps with ALOT of example files and was find _IE examples.. I was try them out some of them.. But well... It would be alot easier if i was find them in help file so i can read about them too Not even User Defined Functions does exist.. And i was look in every map now if there was something about IE or internet but not foundedWant me make a movie as proof there i look in dam every map? Link to comment Share on other sites More sharing options...
DragoooN Posted February 6, 2009 Author Share Posted February 6, 2009 (edited) LoL dude! Serious, i've check help file and i not find anything named IE Management :S But also i was go to the example maps with ALOT of example files and was find _IE examples.. I was try them out some of them.. But well... It would be alot easier if i was find them in help file so i can read about them too Not even User Defined Functions does exist.. And i was look in every map now if there was something about IE or internet but not founded Want me make a movie as proof there i look in dam every map? LoL! Well i found it -.-' it was in the exe file.. But dude. I was look some examples there, and about to open internet explorer... All exempels was open a new internet explorer window? I would need that its just chaning thecurrently web browser so.. [EDIT] GAAH! NVM -.-' (didn't saw it was navigate) Close thread or whatever.. I will fix this in my own way and not bee a leecher! But i rly wanted make this done quick Edited February 6, 2009 by DragoooN Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now