Sign in to follow this  
Followers 0
Bert

GuiCtrlCreateCombo

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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

was your ini file on the computer? also it looks like you're just grabbing one line from the ini to add to the list...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Yes. There is a combo caveat explained in the helpfile. If you ever find unusuality... the helpfile should be your first visit...

Lar.

Larry

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

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