Jump to content

A quickie


 Share

Recommended Posts

One last snag and this stupid little script is done... I'm sure I just have the syntax wrong for OR

What's wrong with this picture?

$supStat = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization")

If $supStat <> ("Org1" OR "Org2") Then
    $supStat = "Undefined"
Link to comment
Share on other sites

One last snag and this stupid little script is done... I'm sure I just have the syntax wrong for OR

What's wrong with this picture?

$supStat = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization")

If $supStat <> ("Org1" OR "Org2") Then
    $supStat = "Undefined"
rrrrrgh.. read post 3 :) Edited by TSO
Link to comment
Share on other sites

Nevermind, think I just found it... closed up the parentheses around the individual values. Thanks to whoever was about to help me though.. because this forum never fails :)

Okay, scratch my "nevermind"... that traded one problem for another.. if someone could show me the correct syntax, I'd appreciate it :P
Link to comment
Share on other sites

One last snag and this stupid little script is done... I'm sure I just have the syntax wrong for OR

What's wrong with this picture?

$supStat = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization")

If $supStat <> ("Org1" OR "Org2") Then
    $supStat = "Undefined"
If $supStat <> "Org1" And $supStat <> "Org2" Then
    $supStat = "Undefined"
EndIf
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I have no idea where you got it in your head that would work.

If $supStat <> "Org1" And $supStat <> "Org2" Then

Drugs or Movies, no telling which :)

Thanks, I'll give it a try.

Link to comment
Share on other sites

I have no idea where you got it in your head that would work.

If $supStat <> "Org1" And $supStat <> "Org2" Then

It looks quite understandable to me, after all it's very close to this which would work

If not ($sipStat = 'Org1' Or $supStat = 'Org2') Then
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

It looks quite understandable to me, after all it's very close to this which would work

If not ($sipStat = 'Org1' Or $supStat = 'Org2') Then
Hah, thanks for the pity post. It's been a while since I've used boolean or anything like it. I'm not a programmer, so I'm usually shooting from the hip with this stuff. But doing some of these things myself saves me from having to hunt down an SE just to write some goofy little script. Naturally your correction is working like a charm, and I'm back in business. Thanks guys.
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...