Sign in to follow this  
Followers 0
Mack

Need help.

6 posts in this topic

Dear AutoIt Forum-Members,

Today i was playing with AutoIT ( For the first time ).

And i was making a script very basic like

[Run ( "C:\Wof.lnk" )] I know that AutoIT doesn't like shortcuts.

But is there a way to run "C:\Wolf\Wolf.exe" when doing this ( [Run ( "C:\Wof.lnk" )] ) command?

That would be cool,

Thanks for your help :whistle:

Its Because i wan't to make a program fore my cousin ( 5 y/old ) so he can open game links from a "FileOpenDialog".

And click on the game icons that appear ( Savy? ).

Share this post


Link to post
Share on other sites



Dear AutoIt Forum-Members,

Today i was playing with AutoIT ( For the first time ).

And i was making a script very basic like

[Run ( "C:\Wof.lnk" )] I know that AutoIT doesn't like shortcuts.

But is there a way to run "C:\Wolf\Wolf.exe" when doing this ( [Run ( "C:\Wof.lnk" )] ) command?

That would be cool,

Thanks for your help  :whistle: 

Its Because i wan't to make a program fore my cousin ( 5 y/old ) so he can open game links from a "FileOpenDialog".

And click on the game icons that appear ( Savy? ).

<{POST_SNAPBACK}>

why not just
Run("C:\Wolf\Wolf.exe")

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

If you really want to work with the lnk, see the following command in the helpfile: FileGetShortcut

Dale

Edit: Also, it is bad form to create a forum topic with a title like "Need Help". This forum is a very rich repository of reference information that people search in to find answers to questions that have already been asked and answered. You'll get an answer, but the topic you entered will be of little or no use to anyone who follows you. "How to launch a program using it's .lnk file?" would have been much better.

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

... i wan't to make a program fore my cousin ( 5 y/old ) so he can open game links from a "FileOpenDialog".

And click on the game icons that appear ( Savy? ).

<{POST_SNAPBACK}>

Here ya go

$Prog_1 = FileOpenDialog("Pick your Favorite Game", @DesktopCommonDir & "\", "Games (*.lnk)", 1)



    $result = StringInStr($Prog_1, ".lnk")
    If $result >= 5 Then
        $details = FileGetShortcut($Prog_1)
        $Prog_1 = $details[0]
        $PID = Run($Prog_1)
        WinWaitActive("")
    Else
        MsgBox(0,"Try Again", "Please pick a Game link  ")
    EndIf

hope your 5 year old cousin enjoys it........

Savy

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

so Mack,

did this help????

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Yes, it did thank you.

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  
Followers 0