SpecialK Posted November 20, 2007 Share Posted November 20, 2007 (edited) 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 November 20, 2007 by SpecialK Link to comment Share on other sites More sharing options...
MadBoy Posted November 20, 2007 Share Posted November 20, 2007 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 SpecialKWhat 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) Link to comment Share on other sites More sharing options...
MadBoy Posted November 20, 2007 Share Posted November 20, 2007 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 Simple My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
SpecialK Posted November 21, 2007 Author Share Posted November 21, 2007 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 SpecialK Link to comment Share on other sites More sharing options...
therks Posted November 21, 2007 Share Posted November 21, 2007 FileCreateShortcut("C:\test.exe", "C:\Shortcut.lnk", "C:\", "/user:peter /pass:pan \\Server1\test.mdb") My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 21, 2007 Share Posted November 21, 2007 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.... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
viji Posted November 21, 2007 Share Posted November 21, 2007 HI Need help.Could anyone plz tel me the pros and cons of AutoIT from windows based application gui testing perspective. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 21, 2007 Moderators Share Posted November 21, 2007 HINeed 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. Link to comment Share on other sites More sharing options...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 i don hav any intent of creating problems. u r wrongYou are wrong to doubt anything an experienced forum member has to say, and ever more wrong to doubt a Mod! And no more PMs! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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