dinodod Posted August 27, 2008 Share Posted August 27, 2008 What I am trying to do is place the results of a StringRegExp into an existing array but from I see, I have to have a temp array to hold the results then inject those results into my array (See below) Is there an easier way? $Resource_Levels[$loop][0] = $oLink.Title $array = StringRegExp($oLink.Title, '[0-9]{1,3}', 1) $Resource_Levels[$loop][1] = $array[0] Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
zorphnog Posted August 27, 2008 Share Posted August 27, 2008 Yep, I'm afraid a temp array is the only way. Link to comment Share on other sites More sharing options...
dinodod Posted August 27, 2008 Author Share Posted August 27, 2008 Is there a better way to script this? I am having to setup a temp array to store the results just to pass those results into another array. $Resource_Levels[$loop][0] = $oLink.Title $array = StringRegExp($oLink.Title, '[0-9]{1,3}', 1) $Resource_Levels[$loop][1] = $array[0] Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 27, 2008 Moderators Share Posted August 27, 2008 Is there a better way to script this? I am having to setup a temp array to store the results just to pass those results into another array.I don't understand what the issue is with the temp array, it's not really a temp, it's the array returned from the function itself. Try this (no idea if it will work)$Resource_Levels[$loop][0] = $oLink.Title $Resource_Levels[$loop][1] = StringRegExpReplace($oLink.Title, "(.*?)(\d{1,3})(.*?\z)", "\2") 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...
dinodod Posted August 27, 2008 Author Share Posted August 27, 2008 Crud Uh well...Thanks for the infoYep, I'm afraid a temp array is the only way. Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 27, 2008 Moderators Share Posted August 27, 2008 I responded to one of the two questions you posted on the same exact thing, and merged the two. Please don't make duplicate posts (and yes, they had different titles, but as you can see the same exact questions). 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...
dinodod Posted August 27, 2008 Author Share Posted August 27, 2008 Sorry, my wireless dropped and I didn't see the 1st post afterwards. I responded to one of the two questions you posted on the same exact thing, and merged the two. Please don't make duplicate posts (and yes, they had different titles, but as you can see the same exact questions). Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 27, 2008 Moderators Share Posted August 27, 2008 Sorry, my wireless dropped and I didn't see the 1st post afterwards.NP, just be a bit more conscious when using your wifi and posting ...Generally speaking, as soon as you hit submit, it may look like you didn't post, but it did (Happens to me, and I just wait until I get connection to the forum again to see if it posted first). 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...
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