WannaBeGut Posted November 28, 2015 Posted November 28, 2015 (edited) Hello!I havent found any solution for my problem in the Internet or on the Forum, excuse me If i overlooked something.For $i = 1 To 5 Assign("oGoogle"&$i, _IECreate("google.com" 0, 1, 0, 0)) $GoogleVar = $oGoogle&$i Assign("oSearchInput"&$i, _IEGetObjById($GoogleVar, "lst-ib")) NextWhat I'am trying to do is open Google.com 5 times with _IECreate and assign it to the Variables "$oGoogle1, $oGoogle2,...", but I have to use these Variables again, because I want to assign the Searchinputs from every $oGoogle to another Variable ($oSearchInput1, $oSearchInput2,...). But if i try to use this code, Autoit tells me that $oGoogle is not declared!I hope someone is willing to help me! (Excuse my Grammar ) Edited November 28, 2015 by WannaBeGut Little Correction
Developers Jos Posted November 28, 2015 Developers Posted November 28, 2015 You probably need this:$GoogleVar = Eval($oGoogle&$i)Jos 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.
WannaBeGut Posted November 28, 2015 Author Posted November 28, 2015 You probably need this:$GoogleVar = Eval($oGoogle&$i)Jos$GoogleVar = Eval($oGoogle&$i)$GoogleVar = Eval(^ ERROR ==> Variable used without being declared.:
Developers Jos Posted November 28, 2015 Developers Posted November 28, 2015 oops ,that obviously should be:$GoogleVar = Eval("oGoogle" & $i)Jos WannaBeGut 1 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.
WannaBeGut Posted November 28, 2015 Author Posted November 28, 2015 oops ,that obviously should be:$GoogleVar = Eval("oGoogle" & $i)JosWorked! Thank you!
Danyfirex Posted November 28, 2015 Posted November 28, 2015 I don't know why I hate Assign+eval. (and don't understand why autoit create/use/implement/keep etc.) Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Developers Jos Posted November 28, 2015 Developers Posted November 28, 2015 I don't know why I hate Assign+eval. (and don't understand why autoit create/use/implement/keep etc.)Learning to program is also taking a step at a time. Arrays will come when the OP in really interested as a (better) alternative. Jos Danyfirex 1 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.
jchd Posted November 28, 2015 Posted November 28, 2015 You may be right Jos but I find that Assign + Eval + related pitfalls is much, much harder to manage than understanding how a speadsheet works, either single column (1D array) or multiple columns (2D array). Most people are used to sheet;column;row and that is dramatically similar to array[row][column]. Danyfirex 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Developers Jos Posted November 29, 2015 Developers Posted November 29, 2015 Understood, but just worked on the OP's current line of thinking and pursued to get that cleared up first without changing too much.I am not stopping any of you to chime in here and show the OP a better alternative. Jos czardas 1 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.
czardas Posted November 29, 2015 Posted November 29, 2015 I don't know why I hate Assign+eval. (and don't understand why autoit create/use/implement/keep etc.)I think it's especially useful because you can create your own syntax (plus interpreter) and run the code with an undefined number of variables assigned on the fly. That's freakin' awesome IMO! operator64 ArrayWorkshop
jchd Posted November 29, 2015 Posted November 29, 2015 Certainly, but I wouldn't call such use "recommended path for new users of AutoIt/scripting/programming". This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
czardas Posted November 29, 2015 Posted November 29, 2015 (edited) @jchd : I was responding to what Danyfirex said, but (of course) you are right in what you say also. Edited November 29, 2015 by czardas operator64 ArrayWorkshop
Danyfirex Posted November 29, 2015 Posted November 29, 2015 @czardas maybe you are right. but I never used them before and I'm sure I'll not use them.When I saw them on help file. I was hearing some low voice. it was Autoit whispering don't use them please. lolSaludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
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