Jump to content

Recommended Posts

Posted

yes it is you just have to write a value somewhere or have a specific thing that you can only see when you've already run the script once

e.g.

if not fileexist (@tempdir & "\checkfile.chk") then
;do whatever you want to do at first start
filewriteline (@tempdir & "\checkfile.chk", ".")
endif
;here is the rest of your script

hope this helps you

Posted

To ensure it is the 1st code executed, then you can use OnAutoItStart(). AutoIt will look for this function as the 1st code to run before anything else.

Func OnAutoItStart()
;Code here
;...
;...
EndFunc

:)

Posted

HI,

if you know that it is the first run you can also do something like this

If $CmdLine[0] > 0 And $CmdLine[1] = "firstRun" Then
do some stuff
Endif

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted (edited)

Nuffilein805,

I get the following error with your code

if not fileexist (@ScriptDir & "\checkfile.chk") then

if not ^ERROR

Error: Unknown function name.

n/m i see the prob should be FileExists

Works great, thanks

-------------------------------

MHz

The code you posted works good but it runs every time the script is ran i only need it to run the very first time a user runs the script

Edited by anyday

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
×
×
  • Create New...