Sign in to follow this  
Followers 0
datkewlguy

edit questions

7 posts in this topic

not sure if this should be posted here or in the gui section so i might post it twice...

if anyone knows some of the quick ways to send commands to controls like edit boxes, such as undo, and select all... i guess i could always just send ^z or ^a to the box, but i was looking for less of messy way... thanks

Share this post


Link to post
Share on other sites



not sure if this should be posted here or in the gui section so i might post it twice...

if anyone knows some of the quick ways to send commands to controls like edit boxes, such as undo, and select all... i guess i could always just send ^z or ^a to the box, but i was looking for less of messy way... thanks

You should lookup ControlClick in the help file. To find the control names etc you can use the AutoIt Window Info tool.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

If your talking about your own GUI made with autoit, what's wrong with GUICtrlSetData()?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

or guictrlread()

;) just wanted to say something o:)

:lmao: ... well that's a good point though!! (Especially mixed with GUICtrlSetData() :king: )


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Replace $Edit_1 with your edit box variable name.

Select all (Selects all text - Ctrl+A)

Dim $EM_SETSEL = 0x00B1
GUICtrlSetState($Edit_1, $GUI_FOCUS)
GUICtrlSendMsg($Edit_1, $EM_SETSEL, 0, -1)

Undo (Undos the last action - Ctrl+Z))

Dim $WM_UNDO = 0x304
GUICtrlSetState($Edit_1, $GUI_FOCUS)
GUICtrlSendMsg($Edit_1, $WM_UNDO, 0, 0)

Copy (Copy the selected text to the clipboard - Ctrl+C)

Dim $WM_COPY = 0x301
GUICtrlSetState($Edit_1, $GUI_FOCUS)
GUICtrlSendMsg($Edit_1, $WM_COPY, 0, 0)

Cut (Cut the selected text to the clipboard - Ctrl+X)

Dim $WM_CUT = 0x300
GUICtrlSetState($Edit_1, $GUI_FOCUS)
GUICtrlSendMsg($Edit_1, $WM_CUT, 0, 0)

Paste (Pastes the text from the clipboard - Ctrl+V)

Dim $WM_PASTE = 0x302
GUICtrlSetState($Edit_1, $GUI_FOCUS)
GUICtrlSendMsg($Edit_1, $WM_PASTE, 0, 0)
Edited by tonedeaf

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Errr... That's nice tonedeaf... I'll be honest, I'd not even seen those in the guiconstants.au3 o:)

Edit:

I guess the reason is, because their not in there ;):lmao: ... didn't notice you Dim'd them, thought they were comments.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0