Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 17:26

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

Advertisement



HELP with CTRL+X

Discussion on HELP with CTRL+X within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
HELP with CTRL+X

Hey
i want to made script when i press START button its activates window and give focus on window, then what i want and where is problem i want when i press CTLR + X to activate function and repeat it till i press CTRL + X again
mlukac89 is offline  
Old 11/12/2012, 16:30   #2
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
anyone ?
mlukac89 is offline  
Old 11/12/2012, 18:54   #3
 
elite*gold: 0
Join Date: Nov 2008
Posts: 455
Received Thanks: 85
like this?:

Code:
HotKeySet("^x", "function")

Global $i = 0

Func function()
   $i += 1
   While  Mod($i, 2) <> 0 
	  whatever()
   WEnd
   ToolTip("", 0, 0)
EndFunc

Func whatever()
   ToolTip("PRESS CTRL+X TO TURN ME OFF", 0, 0)
EndFunc

While 1
   sleep(20)
WEnd
schmuselord1 is offline  
Old 11/12/2012, 19:30   #4
 
Logtetsch's Avatar
 
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
It's better if you declare your new functions under your main function.
Code:
random code
#include <.... .au3>
.........

main function()
.........

random function_1()
.........
random function_2()
.........
The main function is the most important thing in your script. So it's easier to find and your script will be clearer.

But back to your problem.
Code:
HotKeySet ("^x", "_iFunction")

Global $iStatus = True

While True
	if $iStatus == True Then
		MsgBox(64, "iFunction", "Function is enabled!" & @LF & "Press CTRL + X to disable this function.")
	EndIf
WEnd

Func _iFunction()
	if $iStatus == False Then
		$iStatus = True
	ElseIf $iStatus == True Then
		$iStatus = False
	EndIf
EndFunc
Logtetsch is offline  
Old 11/12/2012, 22:49   #5
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Quote:
Originally Posted by Logtetsch View Post
It's better if you declare your new functions under your main function.
Code:
random code
#include <.... .au3>
.........

main function()
.........

random function_1()
.........
random function_2()
.........
The main function is the most important thing in your script. So it's easier to find and your script will be clearer.

But back to your problem.
Code:
HotKeySet ("^x", "_iFunction")

Global $iStatus = True

While True
	if $iStatus == True Then
		MsgBox(64, "iFunction", "Function is enabled!" & @LF & "Press CTRL + X to disable this function.")
	EndIf
WEnd

Func _iFunction()
	if $iStatus == False Then
		$iStatus = True
	ElseIf $iStatus == True Then
		$iStatus = False
	EndIf
EndFunc
yes thats what i want thx very much
mlukac89 is offline  
Reply


Similar Threads Similar Threads
Position von Ctrl
06/01/2009 - GW Bots - 3 Replies
Heyo, wiedermal eine völlig überflüssige Frage von mir. Wie fidne ich die X bzw. Y position von einem Control wie z.B. einem Label heraus, bzw. kann sie auslesen. $LabelPos = GUIGetMsg(1) Geht nicht da^. Ich weiß nicht wie
ctrl
02/26/2009 - General Coding - 8 Replies
was muss ich beim bot hinschreiben das er ctrl (strg) drückt ???
Other Ctrl Crash >_<
08/14/2008 - Lineage 2 - 0 Replies
So its been a month since the last time I and a few others brought up the subject about the cracked l2walker crashing on us whenever we go to click on "other ctrl" in IGwalker options. When I got the crash I clicked on what the problem was from the error message that popped up and it said that "The following files will be included in this error report" file:C:\DOCUME~1\SEDADO~1\LOCALS~1\Temp\b8ea_appco mpat.txt idk what that has to do with walker but I'm hoping we can all help and find a...
ctrl
03/17/2007 - MapleStory - 5 Replies
hey im using a bot and it just stops attacking after a little how do i keep attacking?
Ctrl + Tab Automatisch
10/20/2005 - Technical Support - 4 Replies
Hallo Leute Könnte ihr mir helfen ich suche nen Prog was Automatisch(in5min abstanden) zwische meheren Tasks hin und her Schaltet....? Ich habe es schon mit Automation Anywhere 2.0 versucht aber ich bekomme das nicht so hin wie ich das möchte. Danke in voraus



All times are GMT +2. The time now is 17:26.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.