Jump to content

Recommended Posts

Posted

I have some code that is something like this:

$variable=0

filecopy("oldpath","newpath")

if fileexists("oldpath") then $variable=1

while $variable=1

if not fileexists("newpath") then $variable=1

if fileexists("newpath") then $variable=0

wend

So basically if the file doesn't exist, will it skip the loop (because $variable won't = 1)?

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Posted

I just need to know if a loop will be skipped if the condition is not met

example: if $variable=0 and the loop is for $variable=1

the actual code is this:

$kyncon1=0
    $kyncon2=0
    $kyncon3=0
    $emailtext=WinGetText("Inbox - Microsoft Outlook", "")
    $string3=StringInStr($emailtext,"LKYN",0)
    While $string3<>0
        If $string3<>0 Then FileCopy("G:\CLIENT\IDMI\GMC\PNT WFD\KYN\OMR\LKYN_"&@YEAR&@MON&@MDAY&"*.ps","C:\lkyn print\")
        If FileExists("G:\CLIENT\IDMI\GMC\PNT WFD\KYN\OMR\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_3.ps") Then $kyncon3=1
        If FileExists("G:\CLIENT\IDMI\GMC\PNT WFD\KYN\OMR\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_2.ps") Then $kyncon2=1
        If FileExists("G:\CLIENT\IDMI\GMC\PNT WFD\KYN\OMR\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_1.ps") Then $kyncon1=1
        While $kyncon1=1
            If Not FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_1.ps") Then $kyncon1=1
            If FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_1.ps") Then $kyncon1=0 
            Sleep(100)
        WEnd
        While $kyncon2=1
            If Not FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_2.ps") Then $kyncon2=1
            If FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_2.ps") Then $kyncon2=0
            Sleep(100)
        WEnd
        While $kyncon3=1
            If Not FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_3.ps") Then $kyncon3=1
            If FileExists("C:\lkyn print\LKYN_"&@YEAR&@MON&@MDAY&"_ConsumerBatch_3.ps") Then $kyncon3=0
            Sleep(100)
        WEnd

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Posted

I didn't recall seeing it in the help file (which I pretty much have it open when scite is open... maybe I should write a script to auto open the help file when scite is opened... lol)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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