Jump to content

Need help.


Mack
 Share

Recommended Posts

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? ).

Link to comment
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")
Link to comment
Share on other sites

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...