Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Stringinstr

Discussion on Stringinstr within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Ludder231's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
Stringinstr

Hi,

wie mach ich das, wenn in einer Inputbox nicht "c:\", "d:\" oder "e:\" usw. steht, dass dann eine msgbox kommt.

Ich weiß es geht mit stringinstr...
Aber es soll ja nur gecheckt werden ob EINE dieser festplatten partitionen angegeben wird.

Hier mal ein beispiel:
PHP Code:
$c "c:\"
if not StringInStr(guictrlread(
$Input5), $c) Then
msgbox(" ", " ", " ")
    endif 
So checkt er ja nur eins und jetzt weiß ich nicht wie er überprüfen kann ob entwerder c:\ d:\ oder e:\ angegeben wurde.


So gehts ja nicht, da macht er 3 msgboxen...:
PHP Code:
$c ="C:\"
$d ="D:\"
$e ="E:\"
if not StringInStr(guictrlread(
$Input5), $c) Then
msgbox(" ", " ", " ")
    endif
if not StringInStr(guictrlread(
$Input5), $d) Then
msgbox(" ", " ", " ")
    endif
if not StringInStr(guictrlread(
$Input5), $e) Then
msgbox(" ", " ", " ")
    endif 


MfG Ludder231
Ludder231 is offline  
Old 05/11/2011, 17:08   #2
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
ElseIf ... oder ein einfaches "Or" in der if-abfrage...
omer36 is offline  
Old 05/12/2011, 21:55   #3
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
wieso "not"? macht keinen sinn
ZeraPain is offline  
Old 05/14/2011, 14:47   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 53
Received Thanks: 20
Code:
If Not StringRegExp(GUICtrlRead($cInput), '[A-Za-z]:\') Then
	; ...
EndIf
Shkal is offline  
Reply




All times are GMT +1. The time now is 01:12.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.