DragoooN Posted February 5, 2009 Share Posted February 5, 2009 Hi there! I would want to make a hotkey program there i can choose the cordinate there the mouse will click on!Like the MouseClick("left/right",x,y) commandLike the tooltip in the hotkey examples:Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("")EndFuncAnd an inputbox$cordinates = InputBox("Cords", "Please type the cordinates! Example: 95,45")Now what i want to do is to let the ToolTip come up and then it will show the current cordinate of the mouse!Then the inputbox will come up and there you type in example 95,45(IF POSSIBLE i want make that when i click with mouse the inputbox will popup and will write in the cordinate there i was click!)Then after this the cordinate will be saved into a hotkey function! And when clicking hotkey (example F8) it will click on the cordinates 95,45 with a left click!Also like this:Global $PausedHotKeySet("{PAUSE}", "Pause") ;This must be changed tooo! No hotkey for this i THINK! =PHotKeySet("{F8}", "F8");TOOL TIP MUST SHOW HERE FIRST! I've no clueWaitToClick(inputbox.text=mouse.cordinates) ;I've no clue here tooo..$cordinates = InputBox("Cords", "Please type the cordinates! Example: 95,45")Sleep(500)While 1 ;this will loop and keep program active?Sleep(100)WEndFunc F8 ()MouseClick("left" & $cordinates)EndFunc;And somewhere here i need the tooltip;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;That is look like this as normal (but this shows its just paused or so);Func Pause(); $Paused = NOT $Paused; While $Paused; sleep(100); ToolTip('HotKey-Imp är pausad!"',0,0); WEnd; ToolTip("");EndFunc Link to comment Share on other sites More sharing options...
Authenticity Posted February 5, 2009 Share Posted February 5, 2009 Because there is no Left or Click hot-key your resort other then hooking is to invoke in a tight loop the status of the button (Left? Right?) Like: While 1 If _IsPress(01) Then Local $Pos = MouseGetPos() Local $Ret = InputBox('Mouse position', 'Insert new coordinates:', $Pos[0] & '|' & $Pos[1]) If $Ret Then Local $sCoord = StringSplit($Ret, '|') If $sCoord[0] > 2 Then ConsoleWrite('...') Else MouseClick('left', Int($sCoord[1]), Int($sCoord[2]), 1, 5) EndIf EndIf EndIf Sleep(15) WEnd Link to comment Share on other sites More sharing options...
BrettF Posted February 5, 2009 Share Posted February 5, 2009 MouseGetPos() Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
DragoooN Posted February 5, 2009 Author Share Posted February 5, 2009 (edited) Because there is no Left or Click hot-key your resort other then hooking is to invoke in a tight loop the status of the button (Left? Right?) Like: While 1 If _IsPress(01) Then Local $Pos = MouseGetPos() Local $Ret = InputBox('Mouse position', 'Insert new coordinates:', $Pos[0] & '|' & $Pos[1]) If $Ret Then Local $sCoord = StringSplit($Ret, '|') If $sCoord[0] > 2 Then ConsoleWrite('...') Else MouseClick('left', Int($sCoord[1]), Int($sCoord[2]), 1, 5) EndIf EndIf EndIf Sleep(15) WEnd What? i didn't understand much about the code.. I was type it into a new file and i got directly error when start it on Line 2 Also this line: If _IsPress(01) Then [EDIT] On the lunch i was try made the code, had no time to upload it. But here it is: While 1 $pos = MouseGetPos() $var = Tooltip( $pos[0] & ", " & $pos[1],0,0, "Position") Sleep(100) If MouseClick() GoGoGo() EndIf WEnd Func GoGoGo() $cordinates = InputBox("Cords", "Please type the cordinates! Example: 95,45") Sleep(500) Tooltip("") While 1 Sleep(100) WEnd EndFunc I also want to make that if i click with the mouse it will also save it there or something like that o_O But HOW!!? Edited February 5, 2009 by DragoooN Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now