Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2016 in all areas

  1. This works fine for me when using Select, but not with Switch. $Form1 = GUICreate("Form1", 615, 437, 192, 124) $Input1 = GUICtrlCreateInput("Input1", 16, 24, 209, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Select Case ControlGetFocus($Form1) = "Edit1" ;; do stuff Case $nMsg = $gui_event_close Exit EndSelect WEnd Btw, it will constantly execute the ;; do stuff while the input is focussed - so make sure you handle that it only runs once per focus.
    1 point
  2. so, does the shown command work when ran from the CMD window? Make sure you use the same version (x86 or x64) as you do for AUtoIt3. Jos
    1 point
  3. Because (for historical reasons) directory names are just file names with the <directory attribute> set. And filenames cannot contain slash/backslash characters because they are used to indicate directory tree nesting.
    1 point
  4. Katie_Deely, Do you have any control over the file naming? If so then padding the numbers with leading zeroes will get you the sort you want. If not then you can do something like this: #include <Array.au3> ; Simulated file list Local $aArray[] = ["E:\Pics\1.jpg", "E:\Pics\10.jpg", "E:\Pics\3.jpg", "E:\Pics\100.jpg", "E:\Pics\2.jpg"] ; Add a column _ArrayColInsert($aArray, 1) ; And you get this: _ArrayDisplay($aArray, "New column", Default, 8) ; Now extract the number part, pad it and add it to the new column For $i = 0 To UBound($aArray) - 1 ; Extract the numeric part $sNumber = StringRegExpReplace($aArray[$i][0], "^(.*\\)(\d+)(\..*)$", "$2") ; Padd it - here we use a max of 4 characters $sPadded = StringFormat("%04s", $sNumber) ; And store it $aArray[$i][1] = $sPadded Next ; And here is the result _ArrayDisplay($aArray, "Added padded", Default, 8) ; Now sort the array on the padded column _ArraySort($aArray, 0, 0, 0, 1) ; Which gives this _ArrayDisplay($aArray, "Sorted padded", Default, 8) ; Now delete the added column (and revert to 1D array) _ArrayColDelete($aArray, 1, True) _ArrayDisplay($aArray, "Final", Default, 8) M23
    1 point
  5. I would suggest using a for loop instead. for $a=0 to 2 ; do stuff next If you really want to use a while loop you can add a counter inside it with a condition (If $counter=2 then ExitLoop EndIf). In your example you probably wanted nested loops. You can use an outer for loop that runs three time and an inner for loop that runs 29 times or whatever you want it to be. for $a=0 to 2 for $b=0 to 29 ; do stuff next next
    1 point
  6. Looks like the ISN does not have write permissions to Data\Plugins\formstudio2\plugin.ini. It´s not recomended to install the ISN under Program Files. If you do so..you have to run the ISN as Administrator...or set the Write permissions for the ISN Folder for your user.
    1 point
  7. @Inpho this is really cool. I do this manually. Question - in future sizes >= 256 x 256 will certainly be supported. Why not future proof and simply allow the bigger size now, even if they can't be used? As the bigger sizes become supported, it will not be necessary to update the resource dll... And, I am now on Win10. It tried to make the DLL, then displayed... new file created at "C:\mynewdll2-4842.dll" - of course Win10 did not allow the File Write in the C: root. Any ideas?
    1 point
×
×
  • Create New...