Death Posted February 1, 2009 Posted February 1, 2009 Apparently this code will not work. $input = Inputbox("Location" , "Enter Location") MouseClick("left" , $input) Can anyone shed some light on this?
monoceres Posted February 1, 2009 Posted February 1, 2009 MouseClick needs to have the x and the y position. Read how it works in the help file. Broken link? PM me and I'll send you the file!
bobchernow Posted February 1, 2009 Posted February 1, 2009 I may be wrong but I think your mouse action might not occur cause the inputBox function is waiting for input and the mouse action is not executing till it finishes. By that time the inputox is already gone. Bob --------------------bobchernow, Bob ChernowWhat a long strange trip it's beenUDFs: [post="635594"]Multiple Monitor Screen Resolution Change[/post]
Drew Posted February 1, 2009 Posted February 1, 2009 (edited) $input = Inputbox("Location" , "Enter Location") MouseClick("left" , $input) ^ That won't work because, as Monoceres said, MouseClick needs an X and a Y coordinate to click. If you want the mouse to click the box ( in a way where you will be able to automate the typing as well I would suppose ) than just use WinActivate("Location") <-- Being as thats what you named your Input Box window. I'm not 100% on this , but by creating the inputbox it should already have focus towards the input field , but if not just throw in a ({TAB}). But back to the mouseclick requirements: Lets say I had something I wanted to click at 100,100 on my screen. I would do this: MouseClick("left", 100, 100) Now there are other options and ways of using it , but they can be found in the help file. I'm sure someone beat me to posting to try and help you out , but I'm very bored . Edited February 1, 2009 by Drew
Moderators Melba23 Posted February 1, 2009 Moderators Posted February 1, 2009 Death, What exactly are you trying to do with this code? If we knew what the end result is supposed to be, we could make sensible suggestions to help you get there. At the moment I have no idea what these 2 lines are meant to achieve. Over to you.... M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
TheOnlyOne Posted February 1, 2009 Posted February 1, 2009 Apparently this code will not work. $input = Inputbox("Location" , "Enter Location") MouseClick("left" , $input) Can anyone shed some light on this? like the other says you need the x and the y pos. so you can do like this $inputX = Inputbox("Location" , "Enter Location of X ") $inputY = Inputbox("Location" , "Enter Location of Y ") MouseClick("left" , $inputX,$inputY) that should work
TerarinK Posted February 1, 2009 Posted February 1, 2009 You should edit it like the way it says: $sInput = InputBox("Location", "Enter Location of X ',' Y") $iInput = StringSplit($sInput, ", " Or "," Or " ") MouseClick("left", $iInput[0], $iInput[1]) This wiill be faster the creating two seperate boxs but you need to explain that you need a , in between them. However I did put in "," ", " " " so you can have those all as the delimiter 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E
nfaustin Posted February 2, 2009 Posted February 2, 2009 Try ControlClick() or ControlCommand() function. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
TerarinK Posted February 2, 2009 Posted February 2, 2009 Both ControlClick() and ControlCommand() need a control id to perform the task unsure if you could just tell the application to focus on nothing and have it execute the click or do the command. You could create a whole gui interface with GuiCreate then create a GuiDummyCreate and make in hide possible even disable it but still call the command it that since but remember to set it a 0, 0 when creating the dummy else you will have some negatives to deal with. 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E
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