Leaderboard
Popular Content
Showing content with the highest reputation on 10/28/2023 in all areas
-
Knocking out a bunch of stuff for the GUI. The left side panel is now dynamic and can display different menus (stats, inventory, equipment) by clicking one of the respective tool bar buttons at the top of the GUI. Can flip thru the menus almost like tabs, and can show/hide the needed controls on the fly or automatically, as needed. 80% of the existing button controls are programmed and functioning. Inventory use in free roam mode is functioning for curative items. Working on the same for the battle mode. Equipment handling is complete. You can view and change your equipment. Can view player stats and abilities (As well as displaying ability info in text display by clicking the "Info" button. Chests now have items in them, can be opened (with spacebar) and the item found is displayed in the text display and added to your inventory. You can talk to NPCs with the action button (currently spacebar) still working on this, but it does function. About The Demo: I'm working diligently to get a demo together. There are some changes and new stuff I need to add to the turn-based battle mode, and considering maybe throwing in a active battle mode as well for the demo (not sure yet, active battle mode is uncoded territory at this time). There is also a bunch of sprites and images that I need to draw, expanding the map and developing the in game world graphics and flow. Once I get to a good stopping point in the code, I plan to focus on cranking out new sprites/animations for the demo.2 points
-
You can definitely have different file type filters to select files from the same directory but sections A1 and A2 can't because merged because you are looking to select files from different directories. Sections C1 and C2 can be grouped more logically and be processed in a single loop but as a matter of code length it will be pretty much the same because FileOpenDialog() returns different kind of results for single and multiple file selections. Here is some sort of merged code but can be done in many ways and I am pretty sure it can be done even better: Local $aFileSplit1 = StringSplit($sFileOpenDialog1, "|") Local $aFileSplit2 = StringSplit($sFileOpenDialog2, "|") ; In both dialogs has been selected multiple files If StringInStr($sFileOpenDialog1, "|") And StringInStr($sFileOpenDialog2, "|") Then For $i = 2 To ($aFileSplit1[0] > $aFileSplit2[0] ? $aFileSplit1[0] : $aFileSplit2[0]) If $i <= $aFileSplit1[0] Then FileCopy($aFileSplit1[1] & "\" & $aFileSplit1[$i], $_Selected_Folder) If $i <= $aFileSplit2[0] Then FileCopy($aFileSplit2[1] & "\" & $aFileSplit2[$i], $_Selected_Folder) Next ; Just in first dialog has been selected multiple files ElseIf StringInStr($sFileOpenDialog1, "|") And Not StringInStr($sFileOpenDialog2, "|") For $i = 2 To $aFileSplit1[0] FileCopy($aFileSplit1[1] & "\" & $aFileSplit1[$i], $_Selected_Folder) Next FileCopy($sFileOpenDialog2, $_Selected_Folder) ; Just in second dialog has been selected multiple files ElseIf Not StringInStr($sFileOpenDialog1, "|") And StringInStr($sFileOpenDialog2, "|") For $i = 2 To $aFileSplit2[0] FileCopy($aFileSplit2[1] & "\" & $aFileSplit2[$i], $_Selected_Folder) Next FileCopy($sFileOpenDialog1, $_Selected_Folder) ; In both dialogs has been selected a single file Else FileCopy($sFileOpenDialog1, $_Selected_Folder) FileCopy($sFileOpenDialog2, $_Selected_Folder) EndIf The real optimization would be to ask first for the destination directory and then ask in a loop for as many dialog boxes you want for certain file types: ; ----------------------------------------------- #include <FileConstants.au3> #include <FontConstants.au3> #include <GUIConstantsEx.au3> ; ----------------------------------------------- ; SECTION B: Third, select the destination folder location for both data files Local Const $sMessage3="Select a Destination folder..." Local $_Selected_Folder=FileSelectFolder($sMessage3, "E:\Master_Backup\Type_1") ; ----------------------------------------------- Local $sFileOpenDialog, $aFileSplit Local $aSources[2][3] = [ _ ["Select .edl file", "G:\Session_Master\Performance", "Session File (*.edl)"], _ ["Select .wpd file", "F:\Audio\Type_1", "Wave File (*.wpd)"] _ ] For $Index = 0 To UBound($aSources, 0) - 1 $sFileOpenDialog = FileOpenDialog($aSources[$Index][0], $aSources[$Index][1], $aSources[$Index][2], BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) If StringInStr($sFileOpenDialog, "|") Then $aFileSplit = StringSplit($sFileOpenDialog, "|") For $i = 2 To $aFileSplit[0] FileCopy($aFileSplit[1] & "\" & $aFileSplit[$i], $_Selected_Folder) Next Else FileCopy($sFileOpenDialog, $_Selected_Folder) EndIf Next Maybe it's even better to use a function: ; ----------------------------------------------- #include <FileConstants.au3> #include <FontConstants.au3> #include <GUIConstantsEx.au3> ; ----------------------------------------------- ; SECTION B: Third, select the destination folder location for both data files Local Const $sMessage3="Select a Destination folder..." Local $_Selected_Folder=FileSelectFolder($sMessage3, "E:\Master_Backup\Type_1") ; ----------------------------------------------- SelectFiles($_Selected_Folder, "Select .edl file", "G:\Session_Master\Performance", "Session File (*.edl)") SelectFiles($_Selected_Folder, "Select .wpd file", "F:\Audio\Type_1", "Wave File (*.wpd)") Func SelectFiles($sDestination, $sTitle, $sInitialDir, $sFilter) Local $sFileOpenDialog = FileOpenDialog($sTitle, $sInitialDir, $sFilter, BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) If StringInStr($sFileOpenDialog, "|") Then Local $aFileSplit = StringSplit($sFileOpenDialog, "|") For $i = 2 To $aFileSplit[0] FileCopy($aFileSplit[1] & "\" & $aFileSplit[$i], $sDestination) Next Else FileCopy($sFileOpenDialog, $sDestination) EndIf EndFunc And most appropriate for your case, to maintain the order of operations would be this: ; ----------------------------------------------- #include <FileConstants.au3> #include <FontConstants.au3> #include <GUIConstantsEx.au3> ; ----------------------------------------------- ; SECTION A1: First, select an .edl data file Local Const $sMessage1="Select .edl file" Local $SRC1="G:\Session_Master\Performance" Local $sFileOpenDialog1=FileOpenDialog($sMessage1, $SRC1, "Session File (*.edl)", BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) ; ----------------- ; SECTION A2: Second, select a .wpd data file Local Const $sMessage2="Select .wpd file" Local $SRC2="F:\Audio\Type_1" Local $sFileOpenDialog2=FileOpenDialog($sMessage2, $SRC2, "Wave File (*.wpd)", BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) ; ----------------------------------------------- ; SECTION B: Third, select the destination folder location for both data files Local Const $sMessage3="Select a Destination folder..." Local $_Selected_Folder=FileSelectFolder($sMessage3, "E:\Master_Backup\Type_1") ; ----------------------------------------------- ; SECTION C CopyFiles($sFileOpenDialog1, $_Selected_Folder) CopyFiles($sFileOpenDialog2, $_Selected_Folder) Func CopyFiles($sFileOpenDialog, $sDestination) If StringInStr($sFileOpenDialog, "|") Then Local $aFileSplit = StringSplit($sFileOpenDialog, "|") For $i = 2 To $aFileSplit[0] FileCopy($aFileSplit[1] & "\" & $aFileSplit[$i], $sDestination) Next Else FileCopy($sFileOpenDialog, $sDestination) EndIf EndFunc1 point
-
I like the retro style graphics of your game. One thing that I would suggest it's to design from this phase your UI for different screen sizes and the option to play the game in full screen mode. Good job for what you achieved so far.1 point
-
This will be changed in the next Beta. It will both skip commentlines and blocks when looking for the Func.1 point
-
where does this conclusion come from? It seems that it works for me Example() Func Example() ; Run Notepad Run("notepad.exe") Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) Local $hControl = ControlGetHandle($hWnd, "", "Edit1") ControlSend($hWnd, "", $hControl, "This \ is ok" & @CR) ControlSend($hWnd, "", $hControl, "and this / is ok" & @CR) ControlSend($hWnd, "", $hControl, "and this ? is ok" & @CR) EndFunc ;==>Example1 point
-
Nah, you don't have to mark it solved if doesn't meet your requirements. Somebody may assist you further. Anyway this is what I meant above, if you still want to do it in your way: #include <FileConstants.au3> #include <MsgBoxConstants.au3> Local Const $sMessage = "Select Sessions Files" Local $SRC_DEST="F:\Audio\Type_1" Local $DIR_DEST="G:\Session_Master\Sets\Intro_Outro\Audio" Local $sFileOpenDialog = FileOpenDialog($sMessage, $SRC_DEST, "Wave File (*.wav)", BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) If @error Then ; Complete fail MsgBox($MB_SYSTEMMODAL, "Error", "Selection failed") Else Local $iCounter = IniRead(@ScriptDir & '\cnt.ini', 'Save', 'Counter', 0) ; Read previous counter and continue until the limit it's reached If StringInStr($sFileOpenDialog, "|") Then $aFileSplit = StringSplit($sFileOpenDialog, "|") For $i = 2 To $aFileSplit[0] FileCopy($aFileSplit[1] & "\" & $aFileSplit[$i], $DIR_DEST) $iCounter += 1 If $iCounter == 6 Then ; Your limit IniWrite(@ScriptDir & '\cnt.ini', 'Save', 'Counter', 0) ; Reset counter ExitLoop EndIf ExitLoop Next Else FileCopy($sFileOpenDialog, $DIR_DEST) $iCounter += 1 If $iCounter == 6 Then ; Your limit IniWrite(@ScriptDir & '\cnt.ini', 'Save', 'Counter', 0) ; Reset counter EndIf EndIf $MyBox=MsgBox(4, "Continue?...", "Yes or No") If $MyBox == 6 Then $iPID=ShellExecute(@ScriptDir & "\select_type_1.au3") Else $iPID=ShellExecute(@ScriptDir & "\select_wave_files.au3") EndIf EndIf Another way it's to pass the previous counter as command line argument.1 point
-
https://www.autoitscript.com/site/autoit/autoit-v2/1 point
-
Code is executed line by line and when the execution is complete will move to next line. This is the default behavior. Exception are functions that might take some time to complete, like ShellExecute(), Run(), ProcessClose(), etc. But these function have also versions that will wait for execution to complete: ShellExecuteWait(), RunWait(), ProcessWaitClose(), etc. In your specific case there is no need to wait.1 point
-
@Jos Generally any application that use nonstandard controls and can't be automatized by AutoIt's standard functions (navigating/reading values/...). There are several options as workaround in these situations: OCR or MemoryRead/Write or UIAutomation. For example here new PowerBuilder: I heavily use my own AutoIt's tools for automatizing older version of PowerBuilder where most of standard functions work but as seen in above mentioned topic, new version of PowerBuilder is changed and can't be automatized by standard functions ...1 point