BigDaddyO Posted May 7, 2004 Share Posted May 7, 2004 I am trying to search a listing in an INI file to see if it matches what is being pulled from a comptuer. I have a pretty long list of hard drive volume labels and what I want to do is the DriveGetLabel and then check the return to see if it matches what is in the list in the INI. I currently have $Volume = DriveGetLabel("C:\") I figure I have do do a While statement or something like that if $Volume = INIREAD info. but I just can't seem to figure it out. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 7, 2004 Developers Share Posted May 7, 2004 In this example if the volume name is Data or program it will return FOUND: $Volume = DriveGetLabel("C:\") If IniRead('label.ini','drivelabels',$Volume,'???') = '???' Then msgbox(0,'drivelabel', 'label:'& $Volume & ' not found') Else msgbox(0,'drivelabel', 'label:'& $Volume & ' found') EndIf File label.ini [drivelabels]data=y program=y 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. Link to comment Share on other sites More sharing options...
BigDaddyO Posted May 7, 2004 Author Share Posted May 7, 2004 That worked great. I never really looked that closely at the default section of the iniRead. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now