Jump to content

How to compile Autoit Script which uses "#include <scriptname.au3>"

Recommended Posts

Hi there guys,

I am trying to write an autoit script for pinning shortcuts on the taskbar, as I am unable to pin shortcut on taskbar by <taskbarlinks> <taskbarlinks> in autounattend.xml. Even if I succeed I still wish to know how can I compile an autoit script into exe which uses #include scriptname.au3" function. As it would require "scriptname.au3" and autoit installed as well.

For example, here is my script:

#include <PinToMenu.au3>

;Pin To Taskbar & Start Menu
_PinToMenu(@ProgramFilesDir & "\Internet Explorer\iexplore.exe", 'Task')

When I run this script it actually calls for "pintomenu.au3" if it won't get the file, my script is useless, now I just want to include the commands of pintomenu.au3 in my script itself so that it won't look for pintomenu.au3 file. As I want this for pinning shortcut on the task bar in my unattended installation obviously it won't be having Autoit installed. "pintomenu.au3" is actually comes by default with autoit.

Please guys help me.

Link to post
Share on other sites

What's your question? Just compile.

No it doesn't. You got that from the forum.

You maybe right, I must have got that from this very forum and I might have put that in the autoit folder. Actually I searched for that file and I got it in Autoit folder so only I thought it comes with autoit itself.

I just want to pin some shortcut with the help of pintomenu.au3 but without installing autoit (with the help of exe, as au3 compiled in exe can do the job without autoit)

I have always put includes files in the same folder as the main script and simply compiled. The functions, constants etc... are added automatically. The compiled exe can be run as a stand alone program.

Too late. :)

yeah we can do that, but I want it to run just after the installation (means without Autoit) and I tried the way you are suggesting it doesn't work. It would only work if Autoit is already installed and I want it to work without autoit so only I am compiling it into exe.

Edited by niceguy75
Link to post
Share on other sites

This isn't making sense. If the script runs okay before compiling, then it should compile to an exe which doesn't require AutoIt to be installed. You say it doesn't work, but it has always worked for me.

And not even that pintomenu.au3 or I need to place that au3 file with the exe to get it run properly?

Though, I will try once again and will post the result soon.


Thanks mate it did work this time round. I guess I must have done something wrong last time I tried.

Now I just want to know how can I change the order of pinned items of taskbar?

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

    No registered users viewing this page.

  • Create New...