cerix Posted June 12, 2009 Share Posted June 12, 2009 how can we move mouse from unknowpoint to for example 2 cm high? Link to comment Share on other sites More sharing options...
Yashied Posted June 12, 2009 Share Posted June 12, 2009 (edited) how can we move mouse from unknowpoint to for example 2 cm high?MouseGetPos() and MouseMove().EDIT:2cm? Edited June 12, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DCCD Posted June 12, 2009 Share Posted June 12, 2009 how can we move mouse from unknowpoint to for example 2 cm high? take a look #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('mspaint.exe') WinWait("untitled - Paint","") If Not WinActive("untitled - Paint","") Then WinActivate("untitled - Paint","") WinWaitActive("untitled - Paint","") MouseMove(231,13) MouseDown("left") MouseUp("left") MouseMove(148,97) MouseDown("left") MouseMove(137,147) MouseUp("left") MouseMove(175,100) MouseDown("left") MouseMove(157,148) MouseUp("left") MouseMove(138,128) MouseDown("left") MouseMove(176,129) MouseUp("left") MouseMove(205,123) MouseDown("left") MouseMove(200,152) MouseUp("left") MouseMove(205,109) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Yashied Posted June 12, 2009 Share Posted June 12, 2009 take a look #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('mspaint.exe') WinWait("untitled - Paint","") If Not WinActive("untitled - Paint","") Then WinActivate("untitled - Paint","") WinWaitActive("untitled - Paint","") MouseMove(231,13) MouseDown("left") MouseUp("left") MouseMove(148,97) MouseDown("left") MouseMove(137,147) MouseUp("left") MouseMove(175,100) MouseDown("left") MouseMove(157,148) MouseUp("left") MouseMove(138,128) MouseDown("left") MouseMove(176,129) MouseUp("left") MouseMove(205,123) MouseDown("left") MouseMove(200,152) MouseUp("left") MouseMove(205,109) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End ---What this??? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Zisly Posted June 12, 2009 Share Posted June 12, 2009 how can we move mouse from unknowpoint to for example 2 cm high?Here you go: $pos = MouseGetPos() $new_y = $pos[1] + cm_to_pix(2) MouseMove($pos[0],$new_y) Func cm_to_pix($iCm) Return $iCm*37.795275591 EndFunc Link to comment Share on other sites More sharing options...
DCCD Posted June 12, 2009 Share Posted June 12, 2009 What this???what do you think? ,just nothing!!! [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
cerix Posted June 12, 2009 Author Share Posted June 12, 2009 What this???from unknow point....for example 20 pixel high but we dont know which point is mouse... Link to comment Share on other sites More sharing options...
DCCD Posted June 12, 2009 Share Posted June 12, 2009 from unknow point.... for example 20 pixel high but we dont know which point is mouse... Retrieves the current position of the mouse cursor. $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Yashied Posted June 12, 2009 Share Posted June 12, 2009 Here you go: $pos = MouseGetPos() $new_y = $pos[1] + cm_to_pix(2) MouseMove($pos[0],$new_y) Func cm_to_pix($iCm) Return $iCm*37.795275591 EndFuncAre you measured with a ruler to your monitor? This is wrong, all the different screen resolutions. from unknow point.... for example 20 pixel high but we dont know which point is mouse...$Pos = MouseGetPos() MouseMove($Pos[0], $Pos[1] - 20, 0) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Zisly Posted June 12, 2009 Share Posted June 12, 2009 What was I thinking? xD Link to comment Share on other sites More sharing options...
Yashied Posted June 12, 2009 Share Posted June 12, 2009 what do you think? ,just nothing!!! What are you smoking today? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DCCD Posted June 12, 2009 Share Posted June 12, 2009 What was I thinking? xDUmm wanna pizza?!!!!! [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
herewasplato Posted June 13, 2009 Share Posted June 13, 2009 what do you think? ,just nothing!!! HiYour script assumes that there was an area to write in when Paint first opens :-)...and there probably is for most people...I liked your script/example, but that might not be a good endorsement :-) [size="1"][font="Arial"].[u].[/u][/font][/size] 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