Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/25/2024 in all areas

  1. Why would you want to do that? What are you ultimately trying to achieve? As it is, I am only understanding about half of what you are explaining. The bigger picture would likely give us greater understanding, and possibly suggest the best solution.
    1 point
  2. Oh, I'm sorry. I've seen your hint but didn't get right. CV tells about Button8 and it is working! Excellent. Again, thank you!
    1 point
  3. ValentinM, Which is what I suspected and why I asked. If you were to use modifiers for your HotKey than you would be able to use the simple {DELETE} key within the edit. That is why the modifiers exist. M23
    1 point
  4. mr-es335

    FileSelectFolder Issues

    ioa747, After an evening rest, I tested out the provided script again. All work as it should, with the exceptions of Type_ and Type_4. Neither of these Types, did require a $g_SetName variable. However, to keep "things" consistent with Type_1 and Type_2, I simply decided to create SetName folder for each of these types. Thus: For Type_3, there are three SetName folders: • F:\Audio\Type_3\Emcee • F:\Audio\Type_3\NStrungGuitar • G:\Audio\Type_3\SStrungGuitar For Type_4, there is only a single SetName folder: • F:\Audio\Type_4\EndOfShow With the above now implemented, all is working as it should!! So, ioa747, you did it again! Many, many thanks for your efforts! PS: A "Thank You" to the rest who provided assistance as well! All are appreciated!
    1 point
  5. Dan_555

    FileSelectFolder Issues

    This is how i would solve that particular problem: Global $root = "r:\audio\" Global $sTypeFolder = "Type_1" ;or "Type_2" Global $g_SetName = "TheRighteousBrothers" $test = _CheckPath() ConsoleWrite("error message was =" & $test & @CRLF) Func _CheckPath() ;Error messages 0 = all ok, 1= Root folder does not exists ;2 = $sTypeFolder does not exists, 3= $g_SetName does not exists ;4 = "Edl folder is missing" , 5 = "wav folder is missing" ;6 = "edl and wav folders are missing", 7 = "$sTypeFolder incorrect name (not Type_1 or Type_2) Local $createpath = "", $err = 0 If FileExists($root) Then ConsoleWrite($root & " exists " & @CRLF) If $sTypeFolder = "Type_1" Or $sTypeFolder = "Type_2" Then If FileExists($root & $sTypeFolder) Then $createpath = $root & $sTypeFolder & "\" ConsoleWrite($createpath & " exist " & @CRLF) Else ConsoleWrite($root & $sTypeFolder & " does not exists " & @CRLF) $err = 2 EndIf If $err = 0 Then If FileExists($createpath & $g_SetName) Then $createpath = $createpath & $g_SetName & "\" ConsoleWrite($createpath & " exists " & @CRLF) Else ConsoleWrite($createpath & $g_SetName & " does not exists " & @CRLF) $err = 3 EndIf EndIf If $err = 0 Then If FileExists($createpath & "edl\") Then ConsoleWrite($createpath & "edl exists" & @CRLF) Else ConsoleWrite($createpath & "edl does not exists" & @CRLF) $err = 4 EndIf If FileExists($createpath & "wav\") Then ConsoleWrite($createpath & "wav exists" & @CRLF) Else ConsoleWrite($createpath & "wav does not exists" & @CRLF) If $err = 4 Then $err = 6 Else $err = 5 EndIf EndIf EndIf Else ConsoleWrite($sTypeFolder & " has not a correct name" & @CRLF) $err=7 EndIf Else $err = 1 EndIf Return $err EndFunc ;==>_CheckPath
    1 point
  6. ValentinM, The idea behind the new function was that you call it from within the HotKetSet function and abort if the return shows you that editing is taking place. Here is the snippet that I was using to test: ; In the main code at the start: HotKeySet("^+e", "_CheckEdit") ; And then the function called by the HotKey: Func _CheckEdit() ConsoleWrite(_GUIListViewEx_EditProcess() & @CRLF) EndFunc I was getting either 0 or the ListView handle returned depending on the edit state. So in your case, you would call the function as the first thing in your "hotkey to delete some rows" function and return immediately if editing was occuring - something like this: Func _HotKey_To_Delete_Rows() ; Check for edit process If _GUIListViewEx_EditProcess() <> 0 Then ; Abort! Return Else ; Do whatever you do to delete rows EndIf EndFunc Does that make sense now? M23
    1 point
  7. Thank you for your professional advice and your warm response.
    1 point
  8. Normally, I would say use _WD_Alert. But that isn't possible here since this error is occurring during a call to _WD_LoadWait. You could try calling _WD_Alert before _WD_LoadWait.
    1 point
  9. Bowmore

    IsNumerical

    I would like to share this little function with you. I have found it very useful for validating the input of various functions where the input must be a numerical value. I hope you find it useful Dim $aNumbers[21] $aNumbers[1] = 12345 $aNumbers[2] = "-12345" $aNumbers[3] = +12345.678 $aNumbers[4] = "12345.678" $aNumbers[5] = "One" $aNumbers[6] = "" $aNumbers[7] = "123.One" $aNumbers[8] = 0xFF1165AB $aNumbers[9] = "0x0000Ff" $aNumbers[10] = 0x0000 $aNumbers[11] = "0x0000GG" $aNumbers[12] = 4.395179e+003 $aNumbers[13] = "4.395179e+003" $aNumbers[14] = 4.395179e-003 $aNumbers[15] = "4.395179e-003" $aNumbers[16] = 4e-003 $aNumbers[17] = 4E+003 $aNumbers[18] = "4e-003" $aNumbers[19] = "4E+003" For $i = 1 To 20 Step 1 MsgBox(0,"IsNumeric", '$aNumbers['& $i & '] = ' & $aNumbers[$i] & @CRLF & @CRLF & 'IsNumber() = ' & IsNumber($aNumbers[$i]) & @CRLF & @CRLF & 'IsString() = ' & IsString($aNumbers[$i]) & @CRLF & @CRLF & 'Number() = ' & Number($aNumbers[$i]) & @CRLF & @CRLF & '_IsNumerical() = ' & _IsNumerical($aNumbers[$i]) & @crlf ) Next ; #FUNCTION# ============================================================== ; Name...........: _IsNumerical ; Description ...: Uses a regular expression to check if $vValue can be interpreted as a numeric value ; Syntax.........: _IsNumerical($vValue) ; Parameters ....: $vValue - Value to test if it is numerical ; Return values .: True - If $vValue contains a numeric value ; ...............: False- If $vValue contains a non-numeric value ; Author ........: Bowmore <bowmore at lineone dot net> ; Modified.......: ; Remarks .......: Accepts values in Decimal, Hex and Exponential format. If $vValue is a string then ; the whole string must be numeric value for the function to return True ; Related .......: IsNumber, Number ; Link ..........: ; Example .......: Yes ; =============================================================== Func _IsNumerical($vValue) If IsNumber($vValue) Then Return True If StringRegExp($vValue, "(^[+-]?[0-9]+\.?[0-9]*$|^0x[0-9A-Fa-f]{1,8}$|^[0-9]+\.?[0-9]*[Ee][+-][0-9]+$)") Then Return True Return False EndFunc Edit: Added IsNumber() check to speed things up a bit.
    1 point
×
×
  • Create New...