Jump to content

Recommended Posts

Posted (edited)

Want to create shortcut to be able to run A3X file on a computer
that  not have the Autoit installed. 

What could it be wrong with this shortcut
the shortcut is created but when double click
on the shortcut, autoit3.exe and the A3X file are not run.
and what must be changed to have it to work.

 

FileCreateShortcut(@ScriptDir & "\AutoIt3.exe test.a3x",@DeskTopDir & "\Test.lnk", @ScriptDir & "","", "","" & "","","",@SW_SHOWMINNOACTIVE)

 

Edited by Borje
Posted (edited)
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


$Autoit=@ScriptDir & "\AutoIt3.exe"
$Script=@ScriptDir & "\test.a3x"
$LNK=@DesktopDir & "\Test.lnk"

if FileExists($LNK) Then
    MsgBox(0,"Done already","LNK file in place")
Else
    FileCreateShortcut($Autoit,$LNK,@TempDir,$Script,"Run my script","","","",@SW_SHOWMINNOACTIVE)
    MsgBox(0,"Done","LNK file created")
EndIf

the A3X must be placed as "argument" in the LNK file creation

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

  • Borje changed the title to Solved Problem with filecreateshortcut

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
  • Recently Browsing   0 members

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