Sign in to follow this  
Followers 0
RedJoker

Simple Script won't work

3 posts in this topic

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

Share this post


Link to post
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()
......

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

Share this post


Link to post
Share on other sites

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


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

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  
Followers 0