Jump to content

Recommended Posts

Posted

How can i check if this variable has white spaces?

$Var = "Hello There How Are You"

If (variable has no white spaces) Then

Msgbox(0,"test","No White spaces")

EndIf

If (variable has white spaces) Then

Msgbox(0,"test","This variable has white spaces")

EndIf

  • Developers
Posted

$Var = "Hello There How Are You"
If StringInstr($var," ") then
    Msgbox(0,"test","This variable has white spaces")
Else
    Msgbox(0,"test","No White spaces")
EndIf

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

$Var = "Hello There How Are You"
If StringInstr($var," ") then
    Msgbox(0,"test","This variable has white spaces")
Else
    Msgbox(0,"test","No White spaces")
EndIf

<{POST_SNAPBACK}>

hmm, that was to easy, thx :)

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