Aratorin Posted November 2, 2008 Share Posted November 2, 2008 (edited) Please help! I'm writing a script to download a command-line program, and then use a gui to configure it. Everything is going well, except that I decided that I wanted to enable the user to be able to either click the buttons in the various guis, or to use hotkeys, like a typical widows gui would. I've got the hotkeys working correctly, but for some reason, the underlines for my letters aren't showing up. They show up just fine until I add the hotkeyset and func codes, but then they vanish. Here is an example of the code that is having issuesGlobal Const $GUI_SS_DEFAULT_GUI = BitOR(0x00020000, 0x00C00000, 0x80000000, 0x00080000) Func yYes() ControlClick($exists, "", $existsyes) EndFunc Func nNo() ControlClick($exists, "", $existsno) EndFunc $exists = GUICreate("", 300, 110, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, 0x10000000)) GUICtrlCreateLabel('Do you already have the newest version of exampleprogram saved in a folder called "ExampleProgram" on your desktop?', 10, 10, 280, 40) $existsyes = GUICtrlCreateButton("&Yes", 80, 70, 50, 30) $existsno = GUICtrlCreateButton("&No", 170, 70, 50, 30) WHILE 1 HotKeySet("y") HotKeySet("n") While WinActive($exists) HotKeySet("y", "yYes") HotKeySet("n", "nNo") $existschoice = GUIGetMsg() If $existschoice = $existsyes Then ExitLoop 2 If $existschoice = $existsno Then ExitLoop 2 WEnd WEnd GUIDelete($exists) HotKeySet("y") HotKeySet("n")For some reason, my buttons look like this:Can anyone tell me why the underlines for Y and N aren't appearing?:Update:It seems that if I launch my script by selecting it on my desktop and hitting enter, my underlines are there, but if I launch it by double clicking, they aren't there. The same thing happens whether my script is compiled or not. Any ideas on why this is happening? Edited November 2, 2008 by Aratorin Link to comment Share on other sites More sharing options...
Josbe Posted November 2, 2008 Share Posted November 2, 2008 ...It seems that if I launch my script by selecting it on my desktop and hitting enter, my underlines are there, but if I launch it by double clicking, they aren't there. The same thing happens whether my script is compiled or not. Any ideas on why this is happening?Surely, the underline it's there. Press ALT key to see it. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Aratorin Posted November 2, 2008 Author Share Posted November 2, 2008 (edited) Surely, the underline it's there. Press ALT key to see it. Ah, now it shows up. Is there anyway to get around having to hit the Alt key? I tried adding: Send("!") after creating the gui, but it didn't do anything. Edited November 2, 2008 by Aratorin Link to comment Share on other sites More sharing options...
rasim Posted November 2, 2008 Share Posted November 2, 2008 AratorinExample:Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") Send("{ALT}") Link to comment Share on other sites More sharing options...
Aratorin Posted November 2, 2008 Author Share Posted November 2, 2008 Aratorin Example: Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") Send("{ALT}") Thanks, changing "!" to "{ALT}" worked. Link to comment Share on other sites More sharing options...
spudw2k Posted November 5, 2008 Share Posted November 5, 2008 (edited) That's actually a windows setting too (in XP at least). Go to your Display Properties: Appearance Tab -> Hit the Effects button -> Bottom Checkbox Edited November 5, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
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