Jump to content

Simple Script won't work


Recommended Posts

Hey guys :) Im pretty new with autoit and I wanted to ask why my script doesn't work :)
I just want that it presses Enter again and again :)
Also it says : --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop (I don't really know what this means -.- btw. Im from Germany , maby this is the reason i don't understand it)
Anyway here is my code :
 

#include <GUIConstants.au3>
 
GUICreate("Enter pressed"  ,200,150 )
GUICtrlCreateLabel ("Enter pressed:",  1, 30, 50)
 
$Enter = GUICtrlCreateLabel ("0",  50, 30, 50)
$info = GUICtrlCreateLabel ("Normal State",  1, 70, 1000)
 
HotKeySet("{f1}","_Start")
HotKeySet("{f2}","_Pause")
HotKeySet("{f3}","stop")
 
Func Stop()
Exit
EndFunc
 
Func _Start()
While 1
Send("{Enter down}")
Sleep(1200)
Send("{Enter up}")
GUICtrlSetData($Enter, GUICtrlRead($Enter) + 1)
WEnd
EndFunc
 
Func _Pause()
  GUICtrlSetData($Info, "Paused")
    Sleep(10000)
    GUICtrlSetData($Info, "Normal State")
 EndFunc
Link to comment
Share on other sites

... just  to begin to see the gui add this lines after the HotKeySet ....

i do not enter in the logic of the program....

.....
HotKeySet("{f3}","stop")

GUISetState () ; to show the gui

while 1
    Sleep(1000) ; waiting for keypresses
WEnd
 
Func Stop()
......

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

  • Developers

Also it says : --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop (I don't really know what this means -.- btw. Im from Germany , maby this is the reason i don't understand it)

This is an option you get with the Full version of SciTE4AutoIt3 and is an AutoIt3wrapper hotkey option to Restart or Stop a running script.

Jos

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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