0

In VB Script in Photoshop, is it possible to implement conditionals such as:

if A<>B Then
....code.... 
End if

I can compare equals, i.e. "if A=B etc etc", but I cannot find the syntax for comparing in the "different".

I have tried different combinations of syntax in line with what I know of coding (aka batting in the dark) to no avail. BTW, this apparent limitation would not matter except that there is no GOTO avalibale here statements that I know of. Regards,

Stefania
  • 21
  • 3
  • Can you [edit] and add actual code you tried? – Flakes Feb 24 '21 at 03:51
  • [Adobe Scripting](https://www.adobe.com/devnet/photoshop/scripting.html) can use VBScript, so the actual mechanism of [comparing values in VBScript](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/9hck4s70(v=vs.84)) will not change. In fact, Adode Script is completely irrelevant to the question. You just need to read the [VBScript documentation](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/t0aew7h6(v=vs.84)). – user692942 Feb 24 '21 at 09:23
  • Does this answer your question? [Is it better to use NOT or <> when comparing values?](https://stackoverflow.com/a/369525) – user692942 Feb 24 '21 at 09:25

1 Answers1

0

Of course that VBScript can use both equals and differents. Example you showed is correct :

if (string<>"") then
   ...
end if 

Can you show a sample of code you used ? Maybe the issue is somewhere else, like comparaison different kind of values (string vs number).