Bert Posted September 20, 2005 Share Posted September 20, 2005 Here is a fun one: I wrote a program that will act like a predefined clipboard. You run the main exe, and when you need it, you press ctrl + F11 to run QuickPaste. I have tested it on about 10 PCs. works fine. I conducted my test by running it from my flash drive, and from the root of C:\ This is the problem: I ran it on one PC, and the choices on the dropdown (GuiCtrlCreateCombo) are not there. When you click the dropdown, its like the list doesn't work. Did I do something wrong in the code? Here is the code for QuickPaste, and what happens before QuickPaste runs: ;============ ; UNPlus.exe process the following keystrokes when Ctrl + F11 is pressed: ; HotKeySet ("^{F11}", "test5") ; Func test5() ; Send("^a") ;selects all text in field ; Send("^x") ;blanks out the text field ; Runwait ("quickpaste.exe", "") ; Send("^v") ;paste text from QuickPaste to field ; EndFunc ;============ QuickPaste code: ----------- #include <GuiConstants.au3> ;----------------------------- fileopen ("quickpaste.ini", 0) $note1 = FileReadLine ("quickpaste.ini") GUICreate("QuickPaste", 300, 75) $Combo_2 = GuiCtrlCreateCombo("", 20, 20, 200, 21) GuiCtrlSetData($combo_2, $note1) $button1 = GuiCtrlCreateButton("Paste", 230, 20, 60, 20) ; Run the GUI until it is closed GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop ;When button is pressed, label text is copied to the clipboard Case $msg = $button1 $data = GUICtrlRead($Combo_2) ClipPut($data) exit EndSelect WEnd Exit ;UNPlus.exe will perform the ^v to paste the data to the field desired The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2005 Developers Share Posted September 20, 2005 try: $Combo_2 = GuiCtrlCreateCombo("", 20, 20, 200, 80) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
seandisanti Posted September 20, 2005 Share Posted September 20, 2005 Here is a fun one: I wrote a program that will act like a predefined clipboard. You run the main exe, and when you need it, you press ctrl + F11 to run QuickPaste. I have tested it on about 10 PCs. works fine. I conducted my test by running it from my flash drive, and from the root of C:\This is the problem: I ran it on one PC, and the choices on the dropdown (GuiCtrlCreateCombo) are not there. When you click the dropdown, its like the list doesn't work. Did I do something wrong in the code? Here is the code for QuickPaste, and what happens before QuickPaste runs:;============; UNPlus.exe process the following keystrokes when Ctrl + F11 is pressed:; HotKeySet ("^{F11}", "test5"); Func test5(); Send("^a") ;selects all text in field; Send("^x") ;blanks out the text field; Runwait ("quickpaste.exe", ""); Send("^v") ;paste text from QuickPaste to field; EndFunc;============QuickPaste code:-----------#include <GuiConstants.au3>;-----------------------------fileopen ("quickpaste.ini", 0)$note1 = FileReadLine ("quickpaste.ini")GUICreate("QuickPaste", 300, 75)$Combo_2 = GuiCtrlCreateCombo("", 20, 20, 200, 21)GuiCtrlSetData($combo_2, $note1)$button1 = GuiCtrlCreateButton("Paste", 230, 20, 60, 20); Run the GUI until it is closedGuiSetState()While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop ;When button is pressed, label text is copied to the clipboard Case $msg = $button1 $data = GUICtrlRead($Combo_2) ClipPut($data) exit EndSelectWEndExit;UNPlus.exe will perform the ^v to paste the data to the field desiredwas your ini file on the computer? also it looks like you're just grabbing one line from the ini to add to the list... Link to comment Share on other sites More sharing options...
Bert Posted September 20, 2005 Author Share Posted September 20, 2005 That fixed it. THANKS! It pulls only the first line, and that is fine. QuickPaste is for just a few choices, making it fast to paste things in you type all the time. The main program this works with has things that need to be entered that are cap sensitive. Makes thins much easier. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
is8591 Posted September 21, 2005 Share Posted September 21, 2005 Yes. There is a combo caveat explained in the helpfile. If you ever find unusuality... the helpfile should be your first visit...Lar.LarryUnder caveat are you reffering to:Under Windows XP/2003 window will adapt the size of the opened combo.Because I experienced that caveat on XP - combo was kind of disproportional to other controls but it got populated anyway. 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