Jump to content

aommaster

Active Members
  • Posts

    140
  • Joined

  • Last visited

aommaster's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. Oh, I see. So I'm assuming I can't have this line in the for..in loop?$filelist = _filelisttoarray("bgm/"& $folder, "*.mp3", 1) Thanks
  2. Below are two snippets of code, both of which (I believe) should achieve the same thing. #Include <File.au3> #include <array.au3> $folderarray = _FileListToArray("bgm/", "*", 2) for $folder in $folderarray $filelist = _filelisttoarray("bgm/"& $folder, "*.mp3", 1) for $i=1 to ubound($filelist)-1 msgbox(0,0, $fileitem) Next Next And this is the other: #Include <File.au3> #include <array.au3> $folderarray = _FileListToArray("bgm/", "*", 2) for $folder in $folderarray $filelist = _filelisttoarray("bgm/"& $folder, "*.mp3", 1) for $fileitem in $filelist msgbox(0,0, $fileitem) Next Next However, the second snippet doesn't work. Autoit gives me an error: Variable must be of type "Object" for the second nested For..in loop. What is the reason for this?
  3. Hi! Regarding that speed, is it the speed of the RAM chip in MHz? And while we're on the subject of memory, what does the type indiciate? DDR number? So type 2 means DDR2? Thanks again!
  4. Hi! Loving this UDF, you're doing a great job! Is there anyway to add a function to obtain: 1.GPU clock speed (for the core bus and the memory bus) 2.RAM speed Thanks
  5. Awesome. Thanks everyone!
  6. Are they all in the format of: IT Manual ## If so, then just use a stringtrimleft function, strip the whitespace if you need. If you want it to be changed from a string to a number, use the number() function.
  7. Hi guys Does Autoit support pointer variables, ie. variables that contain the memory location of other variables so that they can be used to pass arrays down to functions? I looked at the PTR function, but that doesn't seem to be what I am looking for. Thanks guys
  8. Hi Rasim! Thank you very much for your help! I was wondering if you could help me solve one more problem. My SendToPreviewer function looks like this: func sendtopreviewer() $lines=_filecountlines(@scriptdir & "\Data\Speechorder.tmp") if $lines==0 Then msgbox(0, "Error", "No speeches to send to previewer. Please add speeches") Else $file=fileopen(@scriptdir & "\Data\Speechorder.tmp", 0) for $k=1 to $lines $line=filereadline($file) $filedata=stringsplit($line, "|") $file2=fileopen($filedata[2], 0) ;msgbox(0, "", $filedata[2]) $string=fileread($file2) $check=stringinstr($string, "@@@@@") if $check==0 Then $tag='[color="#008000"][u]Step ' & $k &':[/u][/color]' $initial=guictrlread($message) guictrlsetdata($message, $initial & $tag & @crlf & $string & @CRLF & @CRLF) else $speechtoedit=$string $array=_stringbetween($string, "@@@@@", "@@@@@") $arraysize=ubound($array) $childwindow=$array $arraypointer=$array for $l=0 to $arraysize -1 ;~ $stringtoreplace="@@@@@" & $array[$l] & "@@@@@" $input=getuserinput($filedata[1], $array[$l], $l) ;~ $tag='[color="#008000"][u]Step ' & $k &':[/u][/color]' ;~ $initial=guictrlread($message) ;~ guictrlsetdata($message, $userinput) Next GUISetState(@SW_SHOW, $ChildWindow[0]) EndIf Next ControlCommand ( $windowtitle, "", $tab, "TabLeft") EndIf EndFunc As you can see from the first if statement, there are multiple files that need to be processed by this program. The problem arises when multiple files satisfy the @@@@@ requirement. Multiple windows pop up and it causes a big problem with arrays and variable naming. Any ideas on how to fix this? Thanks again for your help Rasim!
  9. Rasim, I've got a couple of questions regarding this code: 1. If I want to have the values from the edit box read and passed on the parent window, in essence, this function: $userinput = getuserinput("HJT ~ HJT Speech", $array[$l], $l) How would I do it? 2.If multiple files are being read in the loop (the example I gave only has one, but in reality, multiple files will be read), how do I change the loop so that only a window from one file is displayed at a time? 3.The else statement is not yet complete. I still have to add a GUICTRLSetData similar to the first if statement. However, this data is based on the user input in the dialog boxes. Will this have a problem on the loop? Edit: Rasim, if you would like to discuss this over PM, where I can send you the whole script source code + compiled version (because of the fileinstalls), let me know.
  10. Rasim! That is amazing! It actually fixed my problem completely Thanks so much! I noticed you changed the close child function, but were there any other changes made to the script?
  11. Hi Martin! That was the first thing that came to mind when I encountered this problem. I posted another thread with an example code: http://www.autoitscript.com/forum/index.php?showtopic=86781 However, it does seem like all the other predefined functions seem to deactivate. The general form of my code is: #includes Global variables GUIOnEventMode=1 Define the GUI along with the guictrlsetonevent . . . Functions with use gui oneventmode=1 The last function which looks like: { GUIOnEventMode=0 Stuff here GUIOnEventMode=1 } Which was the form you recommended I use, correct? Because if that is the case, then, it doesn't work
  12. Oh okay. Thanks
  13. I'm running a Quad Core, with Vista 64bit and the script seems to run fine for me
  14. Yeah Martin, I know exactly how hard it is but like I've said in many of my other posts, the script is huge and runs on several other files, making it impossible for me to post. Below is some of the code that shoudl allow you to replicate this: #include <GuiComboBoxEx.au3> #include <GuiImageList.au3> #include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work Global $iMemo _Main() Func _Main() Local $hGUI, $hImage, $hCombo,$bmp, $tab, $tab1, $tab2, $tab3 ; Create GUI $hGUI = GUICreate("ComboBoxEx Set Image List", 400, 300) $tab=GUICtrlCreateTab (10,10,960,720) $tab1=GUICtrlCreateTabitem ("Canned Speech Editor") $hCombo = _GUICtrlComboBoxEx_Create ($hGUI, "", 2, 50, 394, 100) $hImage = _GUIImageList_Create (20, 12, 5, 3) Local $List[7] = _ [0xFF0000 , _ 0x00FF00 , _ 0x0000FF , _ 0xFFFF00 , _ 0x00FFFF , _ 0xFFFFFF , _ 0x000000] ;Set Image List _GUICtrlComboBoxEx_SetImageList ($hCombo, $hImage) ; Add Items For $i = 0 To UBound($List)-1 $bmp = _IMGListAddColor($hImage,$List[$i],20,12) _GUICtrlComboBoxEx_AddString ($hCombo, "", $bmp, $bmp) Next guisetstate() $tab2=GUICtrlCreateTabitem ("test") $tab3=GUICtrlCreateTabitem ("") Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main ; Prog@ndy Func _IMGListAddColor($hImage,$Color,$W=16,$H=16) Local $bmp = _WinAPI_CreateSolidBitMap (_WinAPI_GetDesktopWindow(), $Color,$W,$H) Local $index = _GUIImageList_Add ($hImage,$bmp) _WinAPI_DeleteObject($bmp) Return $index EndFunc
×
×
  • Create New...