HelgeFin
Joined: 04 Apr 2007 Posts: 12
|
Posted: Sun Jul 20, 2008 8:40 am Post subject: Sigswitch: paste a random signature from a file |
|
|
Hi!
This is my fast hack of a random signature paster, which I named sigswitch.ahk.
Now, AHK-gurus, I am happy about any improvements!
Possible improvements:
* get rid of the need to put the number on the first line
* support multi-line signatures
* don't randomize but instead one sig after another
* make it user friendly for people not familiar with AHK and make an sigswitch.exe
Usage:
The file
| Quote: | | C:\Dokumente und Einstellungen\h\Eigene Dateien\My Dropbox\MyScripts\sigs.txt |
needs to contain your signature (and probably you want to change this path which is found twice in the code). The first line must contain the number of signatures. Example of sigs.txt :
| Quote: | 2
Come join me on Twitter.com!
There's A REASON Why Atheists Don't Fly Planes Into Buildings
|
Exchange " Helge" by your always showing part of the signature.
now type "s#" to paste your random signature
| Code: |
#Hotstring *ROC
::s#::
tmp=%Clipboard%
clipboard= ; Start off empty to allow ClipWait to detect when the text has arrived.
FileReadLine, maxX, C:\Dokumente und Einstellungen\h\Eigene Dateien\My Dropbox\MyScripts\sigs.txt,1
clipboard=
( ` % Join`r`n
:) Helge
)
random,randX,1,%maxX%
randX+=1
FileReadLine, addX, C:\Dokumente und Einstellungen\h\Eigene Dateien\My Dropbox\MyScripts\sigs.txt, %randX%
clipboard:=clipboard . addX
ClipWait ; Wait for the clipboard to contain text.
Send,^v
Sleep,100
Clipboard=%tmp%
return
|
License: Public domain
Helge
http://www.facebook.com/home.php#/profile.php?id=627364227 |
|