Sunday, 25 March 2012

Start a Skype chat from a shortcut

No comments:
Ever wanted to open a Skype conversation from the command line?
Once you've established the contact, you can reference it as follows:
For example, if you have me automation_man as one of your Skype contacts, you can open a chat session to me from the command line using this syntax
"c:\Program Files\Skype\Phone\Skype.exe /uri:skype:Automation_Man?chat"
Obviously you may need to alter the path to the executable to suit your installation.

Why might you want to do this?
Well in my case, I get my system to send me a Skype message every time it starts, goes into or comes out of standby, or one of it's backup routines finishes
Note that I have found it works more reliably running it from explorer using a utility such as "Runfromprocess.exe"
Copyright: Nir Sofer (
e.g. the full command lin in my cmd file looks like this:

c:\RunfromProcess.exe explorer.exe "c:\Program Files\Skype\Phone\Skype.exe /uri:skype:Automation_Man?chat"

Using another Nir Sofer command NirCmd, I also send the text to the chat session
NirCmd Sendkey S press
NirCmd Sendkey t press
NirCmd Sendkey a press
NirCmd Sendkey r press
NirCmd Sendkey t press
NirCmd Sendkey P press
NirCmd Sendkey C press
NirCmd Sendkey 1 press
nircmd wait 5000

Then Send the message (ctrl-enter)

NirCmd sendkey ctrl down
NirCmd Sendkey enter press
NirCmd sendkey ctrl up
nircmd wait 12000

Rem Close chat dialog (alt-S-L)

NirCmd sendkey alt down
nircmd wait 500
nircmd sendkey s press
nircmd wait 500
nircmd sendkey l press
nircmd wait 500
NirCmd sendkey alt up
nircmd wait 1000

Rem Add entry to the Application event log
eventcreate /l APPLICATION /so "*** NirCmdStart ***" /t INFORMATION /id 997 /d "System Resume Notification - command triggered from scheduled AM/PM events to wake computer"
nircmd wait 500

And audibly announce the system is online

rem 0 = unmute
NirCmd mutesysvolume 0

rem 0 (silence) ~ 65535 (full volume). (32767=half, 16383=quarter)
NirCmd setsysvolume 28000

Rem  Rate of speech between -10 (very slow) and 10 (very fast). volume of the Speech between 0 and 100
NirCmd speak text "P C 01 online now" 1 80

And finally reset the system volume to something respectable
NirCmd setsysvolume 10000

Another Telstra ripoff, but where else can you get the coverage!

No comments:
We routinely manage our girls mobile phone usage by allowing them a prepaid limit each month.
We bought our eldest girl one of the recent Catch-Of-The-Day LQ smartphones with the intent of her using the web (data) facilities only through Wifi.
On inserting the prepaid SIM and before we figured out how to turn off 3G-data, by simply loading a single Welcome-to-service website, this used 560kb data, *** BARELY HALF A MEGABYTE *** ... but for that luxury - Telstra ripped us off $12.32!
That is INSANE daylight robbery!
I can get an entire 1GB data block for $15 or almost 5GB from my landline ISP for $12!

Monday, 12 March 2012

Visio 2010 hyperlinking shapes on different pages

My wife has just been handed a role where she has to swim-lane processes which cut across multiple streams of the business.
An easy task to to create in Visio ... you would think, perhaps one process layer per page with appropriate swim-lanes on each and just hyperlink between them where they intersect ... too easy!
And thats the problem ... it USED to be "too easy" ... now its to damn obscure!
Thanks M$oft for once again taking what was simple and complicating it.

To cut to the chase, it IS really easy to link from a shape on one page to another page or even another page in another product (Word Excel etc) but another shape .... in the same document ... not so simple.

When you select the shape to link FROM you choose EITHER another file/web-url OR another page in the current visio set from the browse-list. So far so simple. Now select the target shape .... but how?

There is no drop-down/browse-list of the available shapes on the identified target sheet so you have to already know the identity of the shape you want to link TO.
No problem ... select the target shape, right-click and select properties to get the name .... NOPE! Shapes are all assigned common class names!
OK .... define a name for the shape and use that ... NOPE!
Still no joy with a typically helpful error message which says the hyperlink is invalid and the target object cannot be found.
Now the totally in-obvious becomes apparent after extensive searching of the "universal help manual" (aka Google/Bing etc) and finding hundreds of references to linking a shape to everything BUT another shape!
Finally an obscure forum mentions that you can get the shape name for your VBA code by enabling the Visio Developer Tab from the File-Options-General settings and then selecting the shape and clicking the Shape Name tool .... AAAAaaaarrgggH!

To get the shape's name, on the Developer tab, click Shape Name. If you don't see the Developer tab, you can add it:
  1. Click the File tab.
  2. Click Options.
  3. Click the Advanced tab, and under General, select the Run in developer mode check box.
  4. The Shape Name button is in the Shape Design group.
 So far so good ... now you have the real target object name you can link to it, ... but wait! Low-and-behold all is not well even yet!
Following the link does bring the object into view on the target page but doesn't really center focus on it, .... more like hyperlinking to the page really, not the shape.

One last step ... try setting the Zoom factor of the hyperlink to 300% or 400% (experiment for best result) and FINALLY you have a hyperlink between two Visio shapes which jumps-to and focuses-on the target shape.

Hope you found that helpful

OH! One last thing!
You want to go BACK to where you hyperlinked FROM?
Just click the BACK button on the toolbar.
You have to Customise the Quick Access Toolbar and Add the Back (WebGoBack) from the "Commands Not in the Ribbon" group .... then you can click it to return from whence you came.