Jump to content

edit questions


Recommended Posts

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

Link to comment
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.


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

Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
Share on other sites

  • Moderators

or guictrlread()

;) just wanted to say something o:)

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

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.

Link to comment
Share on other sites

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

  • Moderators

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

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.

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...