Propaganda Posted April 24, 2014 Share Posted April 24, 2014 Hi, I have a script that will check my home external IP and send me an email at my work with the information in the body mail. It already work but I would like to push it a little more with the line $as_Body[2] in hyperlink. I will be able to click on the hyperlink to connect home. Here's my script #include <Inet.au3> #include <MsgBoxConstants.au3> Local $sPublicIP = _GetIP() Local $s_SmtpServer = "smtp.server.here" Local $s_FromName = "ME" Local $s_FromAddress = "a@b.com" Local $s_ToAddress = "c@d.com" Local $s_Subject = "My WAN IP - version 1" Local $as_Body[3] $as_Body[0] = "Actualy, my home IP is:" $as_Body[1] = $sPublicIP $as_Body[2] = "mstsc /v:" & $sPublicIP Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Thanks for any help Link to comment Share on other sites More sharing options...
orbs Posted April 24, 2014 Share Posted April 24, 2014 (edited) hello Propoganda, welcome to AutoIt and to the forum! to create a hyperlink to a file, prefix the file with the string file:// notes: 1. you need to specify the full path to the file 2. this is not AutoIt-specific 3. this was not tested over email (especially MIME), but i believe it would work b.t.w to post code in the forum, use the code tags (the A button in the toolbar). EDIT: it should be file:/// (3 slashes) and also slashes instead of backslashes in the full path, like this: File:///c:/windows/system32/mstsc.exe EDIT #2: it works if you open the email in Outlook (or, i guess, any email application which supports it), but not in webmail interface (tested with Yahoo). Edited April 24, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Propaganda Posted February 4, 2016 Author Share Posted February 4, 2016 Hi orbs, Thanks for the reply. It works to open Remote Desktop Program with warnings. The only thing I have to check is to feed the RDP window with the variable $sPublicIP automatically. If you have another idea or someone else. I appreciated TKS Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now