geocine Posted March 4, 2007 Share Posted March 4, 2007 (edited) Im a noob on autoit, i have a fair knowledge in "C". I want to create a bible program with a search dialog and with an ouput dialog. If i search genesis 1:1 it will show the verse, and also words. How could i possible do that with autoit. How can i store an array of strings in a file and call it to be searched and printed out. Edited March 4, 2007 by geocine Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100% Link to comment Share on other sites More sharing options...
PaulIA Posted March 4, 2007 Share Posted March 4, 2007 Im a noob on autoit, i have a fair knowledge in "C". I want to create a bible program with a search dialog and with an ouput dialog. If i search genesis 1:1 it will show the verse, and also words. How could i possible do that with autoit. How can i store an array of strings in a file and call it to be searched and printed out.Well, you could use a two dimensional array for this. You'd have a file for each book and the array would be dimesioned by chapter and verse for a particular book. The problem is going to be speed. Loading Psalms will take a lot longer than Jude. AutoIt is not known for it's speed, so you might want to do some initial testing with different sized files before you commit to arrays.The best way would be to use a database like MySQL. That way, you would have the advantage of the indexes that the database provides and it would be a more compact solution as well. There are MySQL UDFs for AutoIt, so the hard part has already been done for you. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
geocine Posted March 4, 2007 Author Share Posted March 4, 2007 how could i create a two dimensional array that would call a file in autoit? Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100% Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 4, 2007 Moderators Share Posted March 4, 2007 how could i create a two dimensional array that would call a file in autoit? Don't know what the smug look is for... Dim $aBooks[xNumberOfBooks][xNumberArguementsYouWantForThe2DimArray] Example:Dim $aBooks[3][2] $aBooks[1][0] = 'Psalms' $aBooks[1][1] = 'C:\MyBibleProj\Psalms.txt' $aBooks[2][0] = 'Jobe' $aBooks[2][1] = 'C:\MyBibleProj\Jobe.txt' $hGUI = GUICreate('Example', 200, 90) $combo = GUICtrlCreateCombo('', 10, 10, 180, 400) _SetComboNames($combo, $aBooks) GUICtrlCreateLabel('Location:', 10, 40, 45, 20) $label = GUICtrlCreateLabel('', 60, 40, 140, 20) $button = GUICtrlCreateButton('Get Location', 10, 60, 180, 25) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit Case $button _LoadLocation($label, $aBooks, GUICtrlRead($combo)) EndSwitch WEnd Func _LoadLocation($hCID, $aArray, $sText) For $iCC = 1 To UBound($aArray, 1) - 1 If $aArray[$iCC][0] = $sText Then Return GUICtrlSetData($hCID, $aArray[$iCC][1]) Next Return SetError(1, 0, 0) EndFunc Func _SetComboNames($hCID, $aArray) Local $sHoldNames = '' For $iCC = 1 To UBound($aArray, 1) - 1 $sHoldNames &= $aArray[$iCC][0] & '|' Next GUICtrlSetData($hCID, $sHoldNames) EndFunc This is just a demonstration on how to get the information as well. Instead of GUICtrlSetData($hCID, $aArray[$iCC][1]), you could do, Return FileRead($aArray[$iCC][1]) or whatever you like from within that function itself. 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...
geocine Posted March 4, 2007 Author Share Posted March 4, 2007 I'll be trying it later smoke... thanks btw Do Not Steal The Government Hates CompetitionO2JAM AutoPlayBot [|||||.............] 10%Friendster Commenter [..................] 0%Auto Message Download Percentage [|||||||||||||||||] 100% 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