Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 00:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Probleme about Hotkey

Discussion on Probleme about Hotkey within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2012
Posts: 409
Received Thanks: 194
Probleme about Hotkey

Hi,

It's my program :

Quote:
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.8.1
Author: myName

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Aegis = GUICreate("Aegis", 205, 165, 597, 270)
$InputShield = GUICtrlCreateInput("1 To 10", 104, 24, 81, 24)
$InputHP = GUICtrlCreateInput("1 To 10", 104, 56, 81, 24)
$InputLife = GUICtrlCreateInput("1 To 10", 104, 88, 81, 24)
$Save = GUICtrlCreateButton("Save", 72, 120, 75, 25)
$Shield = GUICtrlCreateLabel("Shield", 16, 24, 42, 20)
$HP = GUICtrlCreateLabel("HP ( beacon )", 16, 56, 86, 20)
$Life = GUICtrlCreateLabel("Life", 16, 96, 25, 20)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Save
$AegisShield = GUICtrlRead($InputShield)
$AegisHP = GUICtrlRead($InputHP)
$AegisLife = GUICtrlRead($InputLife)
GUIDelete("Aegis")

EndSwitch
WEnd

Global $Send
HotKeySet("s","Go")
HotKeySet("{ESC}","Exit2")
HotKeySet ("p", "Pause")

While 1
Sleep(100)
WEnd


Func Pause()
$Send = Not $Send
While $Send
Sleep(100)
WEnd
EndFunc


Func Go()
While 1
Send($AegisShield)
Send($AegisHP)
Send($AegisLife)
Sleep(30000)
WEnd
EndFunc

Func Exit2()
Exit 0
EndFunc
But, when i press any hotkeys....nothing
Why Please help me.

Thanks.
Xavierbot is offline  
Old 09/03/2013, 10:25   #2
 
Croco™'s Avatar
 
elite*gold: 235
Join Date: Jan 2012
Posts: 920
Received Thanks: 377
Try it with #RequireAdmin.
Croco™ is offline  
Old 09/03/2013, 12:29   #3
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by Xavierbot View Post
the only way out of that loop, to reach the hotkey declaration, would be the exit function, which immediately closes your script...

this means that the hotkeys never get set...
lolkop is offline  
Old 09/03/2013, 12:33   #4
 
c0w's Avatar
 
elite*gold: 3653
The Black Market: 378/0/0
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
yep you need to declare your hotkeys before you enter any loop. because the code will never reach the point of declaration
c0w is offline  
Old 09/03/2013, 16:19   #5
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Always put your HotKeySet declarations on the top of the script if needed and put { } around s and p.
alpines is offline  
Reply


Similar Threads Similar Threads
Hotkey
06/14/2013 - AutoIt - 5 Replies
Hey leute ich will das wenn ich z.b F1 drücke dass ich eine form öffne wie mache ich das ?
[HELP] For HotKey
06/13/2013 - Flyff Private Server - 4 Replies
Help please ! How to add GlowChange Hotkey ? Or How to Put GlowChange to Start Menu ? Please me please T.T Reply please i need Help !
Hotkey
06/09/2013 - AutoIt - 1 Replies
Hallo ich habe einen s4 hack gemacht man muss erst thanks drücken um ihn zu benutzen bei wenigen funkt das nicht deswegen möchte ich z.b f12 benutzen um das thanls zu über springen wie geht das ich wollte denen das den per pb senden danke
Hotkey´s
05/19/2012 - elite*gold Trading - 0 Replies
Hey ab heute endlich auf der 2.0 ;D Was hat es: Besseres Styling benutzerfreundlicher update System usw.



All times are GMT +1. The time now is 00:42.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.