duketrapp Posted April 21, 2006 Share Posted April 21, 2006 hi folks.. im tryin to use the StringRegExp and StringRegExpReplace functions but dont get it work... i dont get a errorfree pattern... i just want clear my CmdLineRaw from any chars exept "\", "-", "_", """, "'" and all blank chars, cause my script runs in errors, when chars like ":" or "/" are in the CmdLine... StringRegExpReplace should replace the not wanted chars into "_"... like StringRegExpReplace ( CmdLineRaw, "pattern", "_")... .. i tried realy hard to find the right pattern and googled around but i dont get it work.. ..maybe u can help me out.. ..salute AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
duketrapp Posted April 21, 2006 Author Share Posted April 21, 2006 (edited) .. i tried realy hard to find the right pattern... job done Edited April 21, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
duketrapp Posted April 21, 2006 Author Share Posted April 21, 2006 This: $testcmdline = StringRegExpReplace($CmdLineRaw,"[^a-zA-Z0-9ÄÖÜäöüß\-_."&Chr(34)&" ]","") ..works great now... BUT.. please tell me what ASCII code is this character >>> ' <<<... its the sign on the same key as #... ..cant find the code for it . AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 21, 2006 Moderators Share Posted April 21, 2006 This: $testcmdline = StringRegExpReplace($CmdLineRaw,"[^a-zA-Z0-9ÄÖÜäöüß\-_."&Chr(34)&" ]","") ..works great now... BUT.. please tell me what ASCII code is this character >>> ' <<<... its the sign on the same key as #... ..cant find the code for it . Do you mean just a single quote? Opening: Chr(96) Closing: Chr(39) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
duketrapp Posted April 21, 2006 Author Share Posted April 21, 2006 (edited) Do you mean just a single quote?Mhhh.. I dont know.. isnt single quote this: ` ´ ?..i mean this: ' ...the char that is on same key with #maybe it is.. ill check out.. didnt know that there is an open an close ... for same char... Edited April 21, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
seandisanti Posted April 21, 2006 Share Posted April 21, 2006 Mhhh.. I dont know.. isnt single quote this: ` ´ ?..i mean this: ' ...the char that is on same key with #maybe it is.. ill check out.. didnt know that there is an open an close ... for same char...if you go to the autoit helpfile, go to the index tab, and start typing 'ascii characters' it will be the second option by the time you've typed 'asc' that will give you the ascii values you're looking for (and even alot that you're not) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 21, 2006 Moderators Share Posted April 21, 2006 Mhhh.. I dont know.. isnt single quote this: ` ´ ? ..i mean this: ' ...the char that is on same key with # maybe it is.. ill check out.. didnt know that there is an open an close ... for same char...Yeah man I'm lost... I don't have another key for/with #. Guess you could try this and see if what you want is there:For $x = 1 To 255 ConsoleWrite('Chr(' & $x & ') = ' & Chr($x) & @LF) Next Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
seandisanti Posted April 21, 2006 Share Posted April 21, 2006 Yeah man I'm lost... I don't have another key for/with #. Guess you could try this and see if what you want is there:For $x = 1 To 255 ConsoleWrite('Chr(' & $x & ') = ' & Chr($x) & @LF) Nextor just check out the help file so you can see the non printing characters too... 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