AutoHotkey Community

It is currently May 27th, 2012, 10:28 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: February 15th, 2005, 8:16 pm 
I've created a bunch of shortcuts using AHK's FileCreateShortcut command. I haven't created a "valid" file shortcut, but this:

mailto:abc-support@xxxyy.us?cc=Jonny@GGWn.ot&bcc=BoBo&subject=AHK Trouble Ticket | %CLIPBOARD% | solved.

That "target" will open a new mail in Outlook with the preset content.

If you check that shortcuts properties, the Target field is "greyed out/disabled" (while its content is visible). So there's no chance to edit that field :roll: . As those ShCuts should be installed in some offices abroad, I don't think that a workaround using Control, Enable, ... would make sense.

?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2005, 1:38 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Are you saying that it's impossible to create such a shortcut manually?

If so, perhaps you could make it a .URL shortcut instead (untested):
Quote:
Change the first two parameters to suit your preferences:
IniWrite, http://www.google.com, C:\My Shortcut.url, InternetShortcut, URL

The following may be optionally added to assign an icon to the above:
IniWrite, <IconFile>, C:\My Shortcut.url, InternetShortcut, IconFile
IniWrite, 0, C:\My Shortcut.url, InternetShortcut, IconIndex

In the above, replace 0 with the index of the icon (0 is used for the first icon) and replace <IconFile> with a URL, EXE, DLL, or ICO file. Examples: C:\Icons.dll, C:\App.exe, http://www.somedomain.com/ShortcutIcon.ico

The operating system will treat a .URL file created by the above as a real shortcut even though it is a plain text file rather than a .LNK file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2005, 11:25 am 
Image
Maybe this will make it more obvious, what the hell I'm talking about :wink:
That's the properties window of the shortcut I've created with FileCreateShortcut.
For unknown reason the Target field is unaccessible for editing.

Bug or feature ? :lol:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2005, 3:10 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Is "Find Target..." also disabled? :?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2005, 11:07 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
If it doesn't happen with other shortcuts, I'm not sure what the problem could be (I see no explanation for it in the code).

You might try the Internet (URL) shortcut method I mentioned above.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2005, 3:20 pm 
Picked up that topic again and need some clearification/confirmation.

Quote:
Target = mailto:abc-support@xxxyy.us?cc=Jonny@GGWn.ot&bcc=BoBo&subject=AHK Trouble Ticket | %CLIPBOARD% | solved.

That "Target" var used within AHK's FileCreateShortcut will open a new mail in Outlook with the preset content.


AFAICS AHK's FileCreateShortcut expects a standard filename/path.
If the above mentioned Target var is > 255 characters any additional character will be cut off. That seems to be based on the "number of characters in a filename" - restriction, correct ???

Any possible workarround :?:
I've to be able to set a mails body (Target var) > 255 characters to create a "one button-push-mail-templater" :D

8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2005, 3:30 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Can't you create a shortcut to a script?

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2005, 3:37 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Hmm, the more I think of it, the problem then is to execute mailto from a script.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2005, 3:44 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
This works
Code:
run, mailto:mailto:abc-support@xxxyy.us?cc=Jonny@GGWn.ot&bcc=BoBo&subject=AHK Trouble Ticket | %CLIPBOARD% | solved.


So I see no problem. Create a small script and create a shortcut to it.
But maybe you can tell me where the problem is.
I might have run in the wrong direction.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2005, 12:24 pm 
That of course is an evidence that the restriction is within AHK's FileCreateShortcut command. Thx, to clearify that. Your work arround works fine.

One, if not the main reason why I've prefered to have a plain Shortcut option:

No script (better, no interpreters allowed on the target boxes) and or compiled scripts (internal security department won't be happy to deal with/support unknown toys. see above ---> interpreters).

A link would be editable - even by a SuperDau. :wink:
That's btw what the initial topic is about, there seems no option to edit the Target of a link via its properties. If ~ 255 chars the field is empty, if within that range the field isn't empty but grayed out/unaccessible/disabled.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2005, 3:05 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I looked into this and it seems that the OS limits the shortcut's target field to 260 characters (some characters such as spaces get expanded to %20 in a "mailto" shortcut).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2005, 9:39 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
BoBo wrote:
One, if not the main reason why I've prefered to have a plain Shortcut option:

No script (better, no interpreters allowed on the target boxes) and or compiled scripts (internal security department won't be happy to deal with/support unknown toys. see above ---> interpreters).

A link would be editable - even by a SuperDau. :wink:

Would a batch file be an option?
Code:
ECHO OFF
SET M_to=abc-support@xxxyy.us
SET M_cc=Jonny@GGWn.ot
SET M_Bcc=BoBo
SET M_Subj=AHK Trouble Ticket# 1099
SET M_Msg=Problem solved. Please close ticket.

Start /B mailto:"%M_to%?cc=%M_cc%&bcc=%M_Bcc%&subject=%M_Subj%&body=%M_Msg%


*A few characters might cause problems if used in the message text, subject, cc, etc... (& in particular and possibly others)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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