Jump to content

Recommended Posts

Posted
$sftpStatus = 'FAILED'
If $sftpStatus <> 'FAILED' Then
   $sftpStatus = 'SUCCESS'
EndIf
ConsoleWrite($sftpStatus & @CRLF)


$sftpStatus = 'FAILED'
If Not($sftpStatus = 'FAILED') Then
   $sftpStatus = 'SUCCESS'
EndIf
ConsoleWrite($sftpStatus & @CRLF)

Outputs:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\tmp\test.au3"   
FAILED
FAILED
>Exit code: 0    Time: 0.047

trying to toggle the variable but can't seem to find a valid workaround for !=... assuming I'm having an id10t error

 

Don't let that status fool you, I am no advanced memeber!

Posted

I don't understand the question. You're setting the  variable to failed, then checking if it's not failed, set to success... Since it is failed, it's not going to set to success, and will return failed. This is the expected output. Are you trying to set to success if it's something other than failed? Then you should set the variable to something else.... Which with your code It would seem that it would set as success 

Posted

rotflmao yes its doing what I said not what I meant >_< omg... so if I set it = '' then it correctly changes the value..... its a sign I need to stop now and enjoy the weekend!!

Don't let that status fool you, I am no advanced memeber!

Posted

rotflmao yes its doing what I said not what I meant >_< omg... so if I set it = '' then it correctly changes the value..... its a sign I need to stop now and enjoy the weekend!!

The trouble with computers, they do exactly what we tell them!  time for a drink indeed! :)

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