Jump to content
Sign in to follow this  
SpecialK

How to change the properties of a shortcut?

Recommended Posts

SpecialK

Hello,

i have two shortcuts for a program which need to changed with an autoit script.

But i don't have an idea how to do this.

I've already tried to create a new shortcut with "FilecCreateShortcut", but this functions changes the "/" to a "\", so i can't use this function.

How can i open the Properties dialog from a shortcut?

If i would know how to open the dialog, i could use the "ControlSetText" for changing the properties.

Thank you in advance

SpecialK

Edited by SpecialK

Share this post


Link to post
Share on other sites
MadBoy

Hello,

i have two shortcuts for a program which need to changed with an autoit script.

But i don't have an idea how to do this.

I've already tried to create a new shortcut with "FilecCreateShortcut", but this functions changes the "/" to a "\", so i can't use this function.

How can i open the Properties dialog from a shortcut?

If i would know how to open the dialog, i could use the "ControlSetText" for changing the properties.

Thank you in advance

SpecialK

What are you trying to change from the properties? And what is wrong with FileCreateShortcut? Can you provide us the code u used to create the shortcut?


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites
MadBoy

What are you trying to change from the properties? And what is wrong with FileCreateShortcut? Can you provide us the code u used to create the shortcut?

FileGetShortcut to get information from the shortcut and then use FileCreateShortcut with information you want :P Simple


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites
SpecialK

Hello,

the Problem with FileCreateShortcut is the following:

If i want to create this target: "c:\test.exe /user:peter /pass:pan \\Server1\test.mdb

i get with FileCreateShortCut this shortcut: "c:\test.exe \user:peter \pass:pan \\Server1\test.mdb

I get a Backslash instead of a Slash. So the Shortcut do not work.

But i found an other (not so perfect) way:

The script now opens the dir in which i can find the shortcut, then sends a ALT+ENTER for opening the shortcut properties and then i can enter my target with ControlSetText.

Not a nice way, but is works :P

SpecialK

Share this post


Link to post
Share on other sites
BrettF

Does file get shortcut return the wrong thing?

Then this will give you a work around:

$tester = "c:\test.exe \user:peter \pass:pan \\Server1\test.mdb"
$string = StringSplit ($tester, ".exe", 1)
$ret = $string[1] & StringReplace ($string[2], "\", "/")
MsgBox (0, "", $ret)

Otherwise, the last 2 posts should help :P

Share this post


Link to post
Share on other sites
AdmiralAlkex

Does file get shortcut return the wrong thing?

Then this will give you a work around:

$tester = "c:\test.exe \user:peter \pass:pan \\Server1\test.mdb"
$string = StringSplit ($tester, ".exe", 1)
$ret = $string[1] & StringReplace ($string[2], "\", "/")
MsgBox (0, "", $ret)

Otherwise, the last 2 posts should help ;)

It was 3 a minute ago.... :P

Share this post


Link to post
Share on other sites
viji

HI

Need help.Could anyone plz tel me the pros and cons of AutoIT from windows based application gui testing perspective.

Share this post


Link to post
Share on other sites
SmOke_N

HI

Need help.Could anyone plz tel me the pros and cons of AutoIT from windows based application gui testing perspective.

You need to start your own topic and not hijack others.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
BrettF

i don hav any intent of creating problems. u r wrong

You are wrong to doubt anything an experienced forum member has to say, and ever more wrong to doubt a Mod! And no more PMs!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×