Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Stop, Abort, Quit, End Macro hotkey.


  • Please log in to reply
12 replies to this topic

#1 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 05:14 PM

Sup all,

Your friendly Troll here, after two hours in the forums doing searching decided to post the question.

Just need the seeking the code to form a hot key to kill autoit.

ie "pause/ break key" and autoit shuts down the current macro.

Great program TWO :) to you all!!

HAWKZX







#2 BALA

BALA

    I'm a pirate! :)

  • Active Members
  • PipPipPipPipPipPip
  • 504 posts

Posted 13 January 2007 - 05:16 PM

A simple solution is to create a HotKey then have the command inside the function to be Exit

#include <Misc.au3> HotKeySet("{F1}", "Exit") ; HotKey set to F1 Func Exit()     Exit ; Code for action here, in this case to exit the script (i.e. close the program) EndFunc

Edited by BALA, 13 January 2007 - 05:18 PM.

BA-LAhttp://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

#3 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 05:37 PM

Sweet, after 5 mins of playing it got it to work. Thanks for getting me over the hump.

My only other idea, which i am not sure where to look, or how to do it is ....

"DO" ABC
"UNTIL" DEF
"OR UNTIL" X timer (ie 10 mins expires)

#4 BALA

BALA

    I'm a pirate! :)

  • Active Members
  • PipPipPipPipPipPip
  • 504 posts

Posted 13 January 2007 - 05:40 PM

What part are you having trouble with? The Do loop or the timer?
BA-LAhttp://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

#5 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 05:42 PM

Just the timer, adding the Second varable

the "or else" / "or if" / "or until"

Edited by HAWKZX, 13 January 2007 - 05:56 PM.


#6 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 05:58 PM

I guess the anwer would be the Loop with a second varable.

#7 BALA

BALA

    I'm a pirate! :)

  • Active Members
  • PipPipPipPipPipPip
  • 504 posts

Posted 13 January 2007 - 06:02 PM

Wait, I'm confused now. Where's your problem again? :)
BA-LAhttp://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

#8 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 06:06 PM

I think I can handle the timer, just adding the timer as the second variable i am a bit unsure about.

SO the answer is... need help with the "Do loop."

#9 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,490 posts

Posted 13 January 2007 - 06:08 PM

I think I can handle the timer, just adding the timer as the second variable i am a bit unsure about.

SO the answer is... need help with the "Do loop."

if you just want to exit after the timer expired it should be easy ... put the exit in the Adlib func ...

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#10 BALA

BALA

    I'm a pirate! :)

  • Active Members
  • PipPipPipPipPipPip
  • 504 posts

Posted 13 January 2007 - 06:09 PM

What's the code for the timer? Since you could just set the value of the timer as a variable and use that.
BA-LAhttp://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

#11 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 06:14 PM

Honestly I have not written the timer code yet.

All i want to do it, run a cycle which I have already, and if 10 minutes pass by even if the cycle does not "finish" then break out. I am just iffy on the code to do it.

give me 45 secs and i ll copy up the code I have from the other PC

#12 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 06:17 PM

Plain Text         
Func cycle() Sleep(90000) Send("{F1}");turn off then back on Sleep(1000) If (PixelGetColor(1509, 62) = 0) Then target()     MouseMove(1704,82) ; target 1     MouseDown("left")     MouseUp("left") Sleep(5000)     Send("{F1}") MouseMove(851, 647) Sleep (5000) If (PixelGetColor(851, 647) > 10000000) Then empty()     Sleep(11000)             Send("{F2}");turn off then back on     MouseMove(1591,70)     MouseDown("left")     MouseUp("left") If (PixelGetColor(1509, 62) = 0) Then target()     Sleep(5000)     Send("{F2}") MouseMove(851, 647) Sleep (5000) If (PixelGetColor(847, 648) > 10000000) Then empty() Sleep(11000)     Send("{F3}");turn off then back on     MouseMove(1493,77)     MouseDown("left")     MouseUp("left") If (PixelGetColor(1509, 62) = 0) Then target()     Sleep(5000)     Send("{F3}") MouseMove(851, 647) Sleep (5000) If (PixelGetColor(847, 648) > 10000000) Then empty() cycle() EndFunc


#13 HAWKZX

HAWKZX

    Seeker

  • Active Members
  • 17 posts

Posted 13 January 2007 - 07:24 PM

To help with keeping titles and topics the same I created a new thread with the correct title.

http://www.autoitscript.com/forum/index.php?showtopic=39404

Please do any follow up discussion on the new TOPIC so others can find the final answers easier.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users