Jump to content

InputBox Problem


Death
 Share

Recommended Posts

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]

Link to comment
Share on other sites

$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 by Drew
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...