Jump to content

Recommended Posts

Posted

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

Posted (edited)

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
[font="Comic Sans MS"]BA-LA[/font]http://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
Posted

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)

Posted

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."

  • Developers
Posted

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 ...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...