AutoHotkey Community

It is currently May 27th, 2012, 5:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Gadgets with Ahk
PostPosted: March 12th, 2010, 6:17 am 
Offline

Joined: July 14th, 2009, 10:38 pm
Posts: 5
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.

Image

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
Image


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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 7:47 am 
Offline

Joined: November 2nd, 2009, 7:03 am
Posts: 101
very nice... for the image, maybe look into embedding the PNG file: http://www.autohotkey.com/forum/viewtop ... p+encoding

nice idea nonetheless


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 8:34 am 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Very nice, clean, etc. FYI, they are called widgets.

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2010, 2:11 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2010, 2:20 am 
Offline

Joined: February 25th, 2009, 6:54 pm
Posts: 6
Love it! Thank you for sharing.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2010, 10:58 am 
Offline

Joined: July 14th, 2009, 10:38 pm
Posts: 5
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!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 6:02 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
trik wrote:
Very nice, clean, etc. FYI, they are called widgets.

Umm... No... They are called Gadgets.

Wikipedia

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 6:53 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 7:08 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
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.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2010, 12:21 am 
Offline

Joined: March 28th, 2010, 8:13 pm
Posts: 10
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2010, 3:04 am 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2010, 1:07 pm 
Offline

Joined: July 31st, 2008, 10:27 pm
Posts: 336
Who cares?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2010, 3:07 pm 
[url]xkcd.com/386/[/url]
:lol:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2010, 3:09 pm 
Hmm. Doesn't work without "www." Subdomain.

http://www.xkcd.com/386/
:lol:


Report this post
Top
  
Reply with quote  
 Post subject: want copy of IP gadget
PostPosted: August 2nd, 2011, 7:08 am 
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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group