Jump to content

Running A Set Of Commands Once


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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