Jump to content
Sign in to follow this  
Drew

Why don't they show this ><

Recommended Posts

Drew

They should have a list for all the HotKey function abreviations...

What would i put for the hotkey to START the script...

Share this post


Link to post
Share on other sites
Jos

They should have a list for all the HotKey function abreviations...

What would i put for the hotkey to START the script...

What are you talking about ?

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

Share this post


Link to post
Share on other sites
Drew

Where I can press a HotKey and it will begin the script. For example..

HotKeySet("{F9}", "MyExit")

Is what I use to exit the script.

Share this post


Link to post
Share on other sites
ChrisL

all of these work as hotkeys

HotkeySet("=","Start")
HotkeySet("<","Start")
HotkeySet(">","Start")
HotkeySet("/","Start")



While 1
    Sleep (200)
WEnd

Func Start()
    Msgbox(0,"","Start")
    Exit
EndFunc

What are you trying to do?

Share this post


Link to post
Share on other sites
Jos

Where I can press a HotKey and it will begin the script. For example..

HotKeySet("{F9}", "MyExit")

Is what I use to exit the script.

Yes...... but I dont think you answered my question .... which is : What are you asking us to list ?


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

Share this post


Link to post
Share on other sites
Drew

no list .... just what the abbreviation is to start the program for a hotkey.

CODE
hotkeyset("{END}","EndProgram")

hotkeyset("{HOME}","StartProgram")

Opt("PixelCoordMode", 2)

#include <GUIConstants.au3>

GUICreate("Pixel Search", 200, 200, Default, Default)

GUICtrlCreateIcon(@ProgramFilesDir & "\AutoIt3\Icons\au3.ico", -1, 76, 64, 48, 48)

GUISetState()

PixelSearch (5, 5, 796, 796, "0x745028", 5, 1)

If Not @Error Then

MsgBox(4096, "Pixel Results", "X: " & $Pixel[0] & ", Y: " & $Pixel[1])

EndIf

While 1

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE

ExitLoop

EndSwitch

WEnd

GUIDelete()

Func EndProgram

( Func EndProgram() )

Exit

EndFunc

This is what my Error is:

Func EndProgram

Error: Baddly formatted "Func" statement.

Edited by Drew

Share this post


Link to post
Share on other sites
Jos

no list .... just what the abbreviation is to start the program for a hotkey.

To start another program ? Use Run() or Runwait() .

no list .... just what the abbreviation is to start the program for a hotkey.

This is what my Error is:

Func EndProgram

Error: Baddly formatted "Func" statement.

This is wrong :

Func EndProgram
( Func EndProgram() )
Exit
EndFunc

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

Share this post


Link to post
Share on other sites
Drew

What's the right way than? its all one program... i just want it to wait to start until i hit a hotkey to start it

Share this post


Link to post
Share on other sites
ResNullius

What's the right way than? its all one program... i just want it to wait to start until i hit a hotkey to start it

You have no "Startprogram" Function defined, so make the main part of your program into the Startprogram function, like this:

hotkeyset("{END}","EndProgram")
hotkeyset("{HOME}","StartProgram")
Opt("PixelCoordMode", 2)
#include <GUIConstants.au3>

While 1
    Sleep(100)
WEnd

Func StartProgram()
    GUICreate("Pixel Search", 200, 200, Default, Default)
    GUICtrlCreateIcon(@ProgramFilesDir & "\AutoIt3\Icons\au3.ico", -1, 76, 64, 48, 48)
    GUISetState()

    PixelSearch (5, 5, 796, 796, "0x745028", 5, 1)

    If Not @Error Then
        MsgBox(4096, "Pixel Results", "X: " & $Pixel[0] & ", Y: " & $Pixel[1])
    EndIf

    While 1
        $msg = GUIGetMsg()
        Switch $msg
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

    GUIDelete()
EndFunc


Func EndProgram() 
    Exit
EndFunc

Is that what you want?

Edited by ResNullius

Share this post


Link to post
Share on other sites
Obi-w00t

I have some examples below, first is one to pause the execution of the program until the button is pressed. The other is what I think you want to do.

This script will wait until the button is pressed.

;Sets it to be paused and sets hotkeys
Global $Paused = True
hotkeyset("{END}","EndProgram")
hotkeyset("{HOME}","StartProgram")

;Wait until the paused variable is false
Do  
Until $Paused = False


; - The rest of the program
MsgBox(0,"Now","Rest of script")

While 1
    ;Idles forever
WEnd

;Functions, are not run as part of the main program loops

;Sets paused false, will run rest of program
Func StartProgram()
    Global $Paused = False
EndFunc

;Exit program
Func EndProgram()
    Exit
EndFunc
oÝ÷ ØÚ-xZ½ç!jxvØ^¦,^Ç­Èlªæ«y«­¢+Ø)¡½Ñ­åÍÐ ÅÕ½Ðíí9ôÅÕ½Ðì°ÅÕ½Ðí¹AɽɴÅÕ½Ðì¤)¡½Ñ­åÍÐ ÅÕ½Ðíí!=5ôÅÕ½Ðì°ÅÕ½ÐíMÑÉÑMÉ ÅÕ½Ðì¤)=ÁÐ ÅÕ½ÐíA¥á±
½½É5½ÅÕ½Ðì°È¤(¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì((í
ÉÑU$)U%
ÉÑ ÅÕ½ÐíA¥á°MÉ ÅÕ½Ðì°ÈÀÀ°ÈÀÀ°Õ±Ð°Õ±Ð¤)U%
Ñɱ
ÉÑ%½¸¡Aɽɵ¥±Í¥ÈµÀìÅÕ½ÐìÀäÈíÕѽ%ÐÌÀäÈí%½¹ÌÀäÈíÔ̹¥¼ÅÕ½Ðì°´Ä°ÜØ°ØаÐà°Ðà¤)U%MÑMÑÑ ¤((í
¡­ÌѼͥá¥ÐٹСÁÁ¹Ì)]¡¥±Ä($ÀÌØíµÍôU%Ñ5Í ¤(%MÝ¥Ñ ÀÌØíµÍ($%
ÍÀÌØíU%}Y9Q}
1=M($$%á¥Ñ1½½À(%¹MÝ¥Ñ )]¹(í±ÑU$½¸á¥Ð)U%±Ñ ¤(((íչѥ½¹Ì´Ý¥±°±±Ý¥Ñ ¡½Ñ­åÌ((íá¥ÐÑ¡Áɽɴ½¸ÁÉÍÍ¥¹9)Õ¹¹Aɽɴ ¤(%á¥Ð)¹Õ¹((íMÑÉÐÍÉ ´Ý¥±°ÍÉ ½ÈÜÐÔÀÈà¹ÉÑÕɸѡÁ¥á°¼µ½É¥¹ÑÌ)Õ¹MÑÉÑMÉ  ¤($ÀÌØíA¥á°ôA¥á±MÉ  Ô°Ô°ÄÀÈаÜØà°ÅÕ½ÐìÁàÜÐÔÀÈàÅÕ½Ðì°Ô°Ä¤($í%Á¥á°½±½ÕÈÝ̽չ°ÉÑÕɸѡ`¹d(%%9½ÐÉɽÈQ¡¸($%5Í   ½à ÐÀäØ°ÅÕ½ÐíA¥á°IÍÕ±ÑÌÅÕ½Ðì°ÅÕ½Ðí`èÅÕ½ÐìµÀìÀÌØíA¥á±lÁtµÀìÅÕ½Ðì°dèÅÕ½ÐìµÀìÀÌØíA¥á±lÅt¤(%¹%)¹Õ¹

Just as I was typing this looks like ResNullius beat me to an explanation - oh well!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×