Basic GUI Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DarkSider
Posts: 50
Joined: 29 May 2019, 11:06

Basic GUI

25 Nov 2021, 16:29

So i want to add a little tooltip which on click, will add something into clipboard and close tooltip. Else, the tooltip to close after 10 seconds. I think i need to use gui, and i got something like this

Code: Select all

Gui, +toolwindow -border 
Gui, Color, white
gui, add, text,, AAA by
Gui, Add, Button,, me
gui, show, x0 y0

Buttonme:
Gui Close:
Gui, Submit
clipboard := https://discord.gg/2bVQnH6zwa
return

settimer, removemadeby, 10000

removemadeby:
Settimer, removemadeby, Off
Gui, Destroy
return
been struggling with it for over an hour, i don't know how to make the button change the clipboard contents :(
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Basic GUI  Topic is solved

25 Nov 2021, 16:47

Code: Select all

Gui, +toolwindow -border 
Gui, Color, white
gui, add, text,, AAA by
Gui, Add, Button,, me
gui, show, x0 y0
settimer, removemadeby, 10000
return

Buttonme:
Gui Close:
Gui, Submit
clipboard := "https://discord.gg/2bVQnH6zwa"
return

removemadeby:
Settimer, removemadeby, Off
Gui, Destroy
return
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
DarkSider
Posts: 50
Joined: 29 May 2019, 11:06

Re: Basic GUI

25 Nov 2021, 16:52

Clipboard content doesn't get changed though.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Basic GUI

25 Nov 2021, 17:09

Glad to hear, love you too! :D.
Also you can set negative time for removemadeby settimer, removemadeby, -10000 (do you see minus sign?) and it will run only once, so you can remove this line: Settimer, removemadeby, Off from removemadeby label:
With this adjustment:
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Basic GUI

25 Nov 2021, 17:12

DarkSider wrote:
25 Nov 2021, 16:52
Clipboard content doesn't get changed though.
Why? Now Clipboard is "https://discord.gg/2bVQnH6zwa" as you assigned it to this value.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
DarkSider
Posts: 50
Joined: 29 May 2019, 11:06

Re: Basic GUI

25 Nov 2021, 17:20

For me it doesn't change the content of the clipboard after clicking the button.
I tryed to paste into a browser, and nothing changed in the clipboard.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Basic GUI

25 Nov 2021, 17:31

Did you copy/paste my code? For me it works and I have https://discord.gg/2bVQnH6zwa in the clipboard.
Have you quotes here: clipboard := "https://discord.gg/2bVQnH6zwa"
And by the way, what do you want to be in Clipboard? https://discord.gg/2bVQnH6zwa or something else?
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
DarkSider
Posts: 50
Joined: 29 May 2019, 11:06

Re: Basic GUI

25 Nov 2021, 17:39

Sorry i must have copied something wrong or one of the ahk files running modified something, i recopied and it works *blush*

<3

edit: oh i modified the button name and i forgot i need to change the function name too. This was my first meeting with GUI :D
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Basic GUI

25 Nov 2021, 17:44

Congratulations! :bravo:
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Bing [Bot], Google [Bot], Mateusz53, Spawnova, wilkster and 171 guests