 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Asty
Joined: 14 Jul 2009 Posts: 5
|
Posted: Fri Mar 12, 2010 5:17 am Post subject: Gadgets with Ahk |
|
|
Well, a few weeks ago i was looking for a gadget who gives me my internal and external ip. I couldn't find it so i've made one.
Here is how it looks with others windows gadgets.
| Code: | #notrayicon
#singleinstance force
;To autostart with windows (optional); RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Run, Gadget IP, %A_ScriptFullPath%
urlDownloadToFile,http://www.whatismyip.com/automation/n09230945.asp,C:\ip.tmp ; To get your external ip
FileReadLine,ExternalIP,C:\ip.tmp,1
Gui, Add, Text, x120 y0 w10 h10 gclose, ; this is a black spot behind the close button in the picture
Gui, Add, Text, x108 y0 w10 h10 grefresh,
Gui, Add, Picture, x0 y0 w130 h62 , %A_scriptdir%/ip3.png ; The background image.
Gui, Color, 000000
gui, font, s6.5 cFFFFFF, Gauutami
Gui, Add, Text, x46 y30 w80 h13 gLAN, %A_IPAddress1%
Gui, Add, Text, x42 y45 w85 h13 gWAN,%ExternalIP%
Gui -Caption +toolwindow ; "-caption" wont show the button bar
Gui, Show, x1750 y360 h62 w130, Lan/Wan IP
Return
GuiClose:
ExitApp
close:
ExitApp
Refresh:
Reload
Return
WAN:
clipboard = %ExternalIP% ; Clicking the ip will copy it.
Return
LAN:
clipboard = %A_IPAdress1%
Return
#d::
winminimizeall
|
Background IMG
Extra: Code for the other gadget. (unfinished)
| Code: | #notrayicon
#singleinstance force
;RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Run, Gadget Subs, %A_ScriptFullPath%
Gui, Add, Text, x120 y0 w10 h10 gclose,
Gui, Add, Text, x108 y0 w10 h10 grefresh,
Gui, Add, Picture, x0 y0 w130 h62 , %A_scriptdir%/subtitulos1.png
Gui, Color, 000000
gui, font, s6.5 c000000, Gauutami
Gui, Add, Edit, x12 y34 w40 h15 vserie1,
Gui, Add, Edit, x72 y34 w40 h15 vcapitulo,
Gui, Add, Button, x116 y30 w0 h0 gsend, >
Gui -Caption +toolwindow
Gui, Show, x1750 y280 h62 w130, Subititulos
Return
send:
Gui, submit, nohide
StringReplace, Serie, Serie1,%A_Space%,-, All
Run, http://subtitulos.es/%serie%/%capitulo%
Return
close:
ExitApp
Refresh:
Reload
Return
#d::
winminimizeall
; ::tbbt::the big bang theory |
Background IMG
 |
|
| Back to top |
|
 |
Opie
Joined: 02 Nov 2009 Posts: 101
|
|
| Back to top |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Fri Mar 12, 2010 7:34 am Post subject: |
|
|
Very nice, clean, etc. FYI, they are called widgets. _________________ Religion is false. >_> |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Mar 13, 2010 1:11 am Post subject: |
|
|
you can add this if u like it, to easy move ur gadgets
Gui, Add, Picture, x0 y0 w130 h62 gmove, %A_scriptdir%/ip3.png
Move:
PostMessage, 0xA1, 2,,, A
return |
|
| Back to top |
|
 |
gronne
Joined: 25 Feb 2009 Posts: 6
|
Posted: Sat Mar 13, 2010 1:20 am Post subject: |
|
|
| Love it! Thank you for sharing. |
|
| Back to top |
|
 |
Asty
Joined: 14 Jul 2009 Posts: 5
|
Posted: Sun Mar 14, 2010 9:58 am Post subject: |
|
|
| Anonymous wrote: | you can add this if u like it, to easy move ur gadgets
Gui, Add, Picture, x0 y0 w130 h62 gmove, %A_scriptdir%/ip3.png
Move:
PostMessage, 0xA1, 2,,, A
return |
Thx!! |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
Guest
|
Posted: Mon Mar 15, 2010 5:53 pm Post subject: |
|
|
Actually they can be both or either. | Quote: | | Microsoft Gadgets are lightweight single-purpose applications, or software widgets, that can sit on a Microsoft Windows user's computer desktop, or are hosted on a web page. | Please read your own wiki links. |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
Posted: Mon Mar 15, 2010 6:08 pm Post subject: |
|
|
| Anonymous wrote: | Actually they can be both or either. | Quote: | | Microsoft Gadgets are lightweight single-purpose applications, or software widgets, that can sit on a Microsoft Windows user's computer desktop, or are hosted on a web page. | Please read your own wiki links. |
Perhaps you should read it a little closer yourself;
The first two words of the quote you provided say it all... "Microsoft Gadgets"
"Microsoft Gadgets" is the proper name for a specific set of widgets.
It's like telling someone that Microsoft's operating system is called "Operating System";
It's not... It's Windows.
So, yes, they are, in some form, widgets, but they are -CALLED- Gadgets. _________________
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played." |
|
| Back to top |
|
 |
bad_w0lf
Joined: 28 Mar 2010 Posts: 10
|
Posted: Tue Mar 30, 2010 11:21 pm Post subject: |
|
|
I think it would be more like calling a computer a computer or a laptop rather than an HP or a Dell or Toshiba. _________________ (\__/)
(='.'=)
(")_(")
This is Bunny
Help Bunny by Copying and pasting Bunny into your web page to help him gain world domination. |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Wed Mar 31, 2010 2:04 am Post subject: |
|
|
| Zarrok wrote: | | I think it would be more like calling a computer a computer or a laptop rather than an HP or a Dell or Toshiba. |
You aren't wrong, but trik had corrected the OP by saying (using your metaphor) that it wasn't called a Dell, it was called a computer.
The OP was not wrong in calling them gadgets. |
|
| Back to top |
|
 |
Morpheus
Joined: 31 Jul 2008 Posts: 273
|
Posted: Wed Mar 31, 2010 12:07 pm Post subject: |
|
|
| Who cares? |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Mar 31, 2010 2:07 pm Post subject: |
|
|
[url]xkcd.com/386/[/url]
 |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Mar 31, 2010 2:09 pm Post subject: |
|
|
Hmm. Doesn't work without "www." Subdomain.
www.xkcd.com/386/
 |
|
| Back to top |
|
 |
guest2 Guest
|
Posted: Tue Aug 02, 2011 6:08 am Post subject: want copy of IP gadget |
|
|
Asty,
Do you have a .gadget file created for that IP (LAN and WAN) gadget? I like it very much and would like in installable file. Thx |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|