Jump to content

No way to unselect selected tet in edit control?


E1M1
 Share

Recommended Posts

$Edit1 = GUICtrlCreateEdit("test", 3, 3, 634, 474, 0,0)
_GUICtrlEdit_SetSel($Edit1,0,0)

This should set sel 0,0 but for some reason it dont. I wonder what causes this.

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIEDIT.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 640, 480, 0, 0)
$Edit1 = GUICtrlCreateEdit("test", 3, 3, 634, 474, 0,0)
_GUICtrlEdit_SetSel($Edit1,0,0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

And why i select all default for edit control? In C# or C++ I dont have select all as default for edit, it's only with autoit.

Edited by E1M1

edited

Link to comment
Share on other sites

Selection can only be set if the control is visible/enabled. Move _GuiCtrlEdit_SetSel() after GuiSetState().

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Gah that's strange, isnt there better method? probably I have to "find out what writes to this address" and then write pure memory based patch :)

Yes, I almost got autoit3.exe patched with "olly dbg" ;) Just thought it would be good excuse to practise it :P

Is that meant to be pure gibberish? It made no sense to me at all.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

The phrase "...I almost got autoit3.exe patched" seems to expressly violate the license you have to your copy of AutoIt.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...