Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Sigswitch: paste a random signature from a file


  • Please log in to reply
No replies to this topic

Poll: Please choose one: (1 member(s) have cast votes)

Please choose one:

  1. I will test this (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. interesting, I might test this later (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. please make this more user friendly (0 votes [0.00%])

    Percentage of vote: 0.00%

  4. not interested (1 votes [100.00%])

    Percentage of vote: 100.00%

  5. I'd prefer cowboy McNeal's grandmother (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote
HelgeFin
  • Members
  • 12 posts
  • Last active: Jul 23 2010 10:30 AM
  • Joined: 04 Apr 2007
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

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 :

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

#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

<!-- m -->http://www.facebook.... ... =627364227<!-- m -->