Jump to content

MrCreatoR

MVPs
  • Posts

    3,478
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by MrCreatoR

  1. You trying to open explorer and make it transparent? This one a little bit more complicated, you need to wait for the window with the specified path, and check for new window, something like this... _Explorer_Open(@ScriptDir, 100) Func _Explorer_Open($sPath, $iTrans, $iState = @SW_MAXIMIZE) Local $iOld_WWD, $aWinList_Old, $aWinList_New $iOld_WWD = Opt('WinWaitDelay', 0) $aWinList_Old = WinList('[CLASS:CabinetWClass]') ShellExecute('EXPLORER.EXE', $sPath, '', '', $iState) WinWait('[CLASS:CabinetWClass;REGEXPTITLE:.*?' & StringRegExpReplace($sPath, '^.*\\', '') & ']') $aWinList_New = WinList('[CLASS:CabinetWClass]') For $i = 1 To UBound($aWinList_New) - 1 For $j = 1 To UBound($aWinList_Old) - 1 If $aWinList_New[$i][1] = $aWinList_Old[$j][1] Then ContinueLoop 2 EndIf Next WinSetTrans($aWinList_New[$i][0], '', $iTrans) ExitLoop Next Opt('WinWaitDelay', $iOld_WWD) EndFunc
  2. Sure... _FileOpenDialog('Title', @ScriptDir, 'All (*.*)', 0, '', 0, 200) Func _FileOpenDialog($sTitle, $sInitDir, $sFilter, $iOpts = 0, $sDefName = '', $hWnd = 0, $iTrans = 255) Local $sSrc = _ "$_ = Opt('WinWaitDelay', 0) + WinSetTrans(WinWait('[CLASS:#32770;TITLE:" & $sTitle & "]', 'ShellView', 3), '', " & $iTrans & ")" Run(@AutoItExe & ' /AutoIt3ExecuteLine "' & $sSrc & '"', '', @SW_HIDE) Return FileOpenDialog($sTitle, $sInitDir, $sFilter, $iOpts, $sDefName, $hWnd) EndFunc
  3. Lazy method: _FileSelectFolder('Title', '', 0, @ScriptDir, 0, 200) Func _FileSelectFolder($sTitle, $sRoot, $iFlag = 0, $sInitDir = '', $hWnd = 0, $iTrans = 255) Local $sSrc = _ "$_ = Opt('WinWaitDelay', 0) + WinSetTrans(WinWait('[CLASS:#32770;TITLE:" & $sTitle & "]', 'ShellView', 3), '', " & $iTrans & ")" Run(@AutoItExe & ' /AutoIt3ExecuteLine "' & $sSrc & '"', '', @SW_HIDE) Return FileSelectFolder($sTitle, $sRoot, $iFlag, $sInitDir, $hWnd) EndFunc
  4. Oh i see now, so in the Beta the $SS_CENTERIMAGE style is forced. I only pointed out that this can solve the issue for the user, but did not suggested it as a permanent solution. Sorry for that, i hope you will find a correct solution for the problem without braking other functionality .
  5. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate('Form1', 300, 200, -1, -1, $WS_SIZEBOX) $PIC = GUICtrlCreatePic(@AutoItExe & '\..\Examples\GUI\msoobe.jpg', 0, 0, 300, 300) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) GUISetState() While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Created image does not accept the resizing. Also if we use GUICtrlSetPos, it will move the image relative to it's current position. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate('Form1', 300, 200, -1, -1, $WS_SIZEBOX) $aPos1 = WinGetClientSize($Form1) $iPic = GUICtrlCreatePic(@AutoItExe & '\..\Examples\GUI\msoobe.jpg', 0, 0, $aPos1[0], $aPos1[1]) ;GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) GUISetState() While GUIGetMsg() <> $GUI_EVENT_CLOSE $aPos = WinGetClientSize($Form1) If $aPos[0] <> $aPos1[0] Or $aPos[1] <> $aPos1[1] Then GUICtrlSetPos($iPic, 0, 0, $aPos[0], $aPos[1]) $aPos1 = $aPos EndIf WEnd In 3.3.15.1 it was working fine.
  6. Now i understand, thanks for clarification. It was interesting for me to see how it takes the strings from script, i mean the logic behind detecting translatable strings and distinguish them from other strings that should not be translated.
  7. I don't understand, then what i should do to see the results of eci.exe? I thought that this tool can help in getting strings table quicker. Your readme files sais: So this is what i am trying to do. But no success, i don't get translatable strings.
  8. No. Well, i used your Extract.au3 from the archive, it runs the eci.exe only from there.
  9. Not working for me, eci.exe returns empty string. I use Win 10 Home x64.
  10. Then we do it like this: If Not $iNoRow Then __ArrayDisplay_SortItems($idListView, 0) EndIf Well, the logics says that ascending should be from up to down, so i think that the arrow as well should indicate the same.
  11. And if we add __ArrayDisplay_SortItems($idListView, 0) after __ArrayDisplay_RegisterSortCallBack($idListView, 2, True, "__ArrayDisplay_SortCallBack") we get this arrow displayed at the beginning (right after the array is displayed). Btw, is this arrow should be in opposite direction or i am wrong?
  12. In what AutoIt version? I have it in 3.3.14.5 (final release).
  13. Old version of DDE usage... $sURL = _OpenGetURL('Firefox') ConsoleWrite($sURL & @CRLF) Func _OpenGetURL($sServer, $sURL = "", $iWin = -1, $iRetType = 0, $iWait = 10000) Local $aRet, $uIdInst = DllStructCreate("int") Local $hServer[1], $hTopic[1], $hItem[1], $hConv[1], $hData[1], $sData[1] Local $sTopic = "WWW_OpenURL", $sItem = '"' & $sURL & '",,0x' & Hex($iWin) If $sURL = '' Then $sTopic = "WWW_GetWindowInfo" $sItem = "0x" & Hex($iWin) EndIf Local $hDll = DllOpen("user32.dll") If $hDll = -1 Then Return SetError(1, 0, "") ; Error to open Dll $aRet = DllCall($hDll, "int", "DdeInitialize", "ptr", DllStructGetPtr($uIdInst), "ptr", 0, "int", 0, "int", 0) If $aRet[0] Then Return SetError(2, $aRet[0], "") ; Error Initializing DDE $hServer = DllCall($hDll, "int", "DdeCreateStringHandle", "int", DllStructGetData($uIdInst, 1), "str", $sServer, "int", 1004) If $hServer[0] Then $hTopic = DllCall($hDll, "int", "DdeCreateStringHandle", "int", DllStructGetData($uIdInst, 1), "str", $sTopic, "int", 1004) If $hTopic[0] Then $hItem = DllCall($hDll, "int", "DdeCreateStringHandle", "int", DllStructGetData($uIdInst, 1), "str", $sItem, "int", 1004) If $hItem[0] Then $hConv = DllCall($hDll, "int", "DdeConnect", "int", DllStructGetData($uIdInst, 1), "int", $hServer[0], "int", $hTopic[0], "int", 0) If $hConv[0] Then $hData = DllCall($hDll, "int", "DdeClientTransaction", "ptr", 0, "int", 0, "int", $hConv[0], "int", $hItem[0], "int", 1, "int", 0x20B0, "int", $iWait, "ptr", 0) If $hData[0] Then $sData = DllCall($hDll, "str", "DdeAccessData", "int", $hData[0], "ptr", 0) EndIf EndIf EndIf EndIf $iErr = DllCall($hDll, "int", "DdeGetLastError", "int", DllStructGetData($uIdInst, 1)) If $hData[0] Then DllCall($hDll, "int", "DdeFreeDataHandle", "int", $hData[0]) If $hConv[0] Then DllCall($hDll, "int", "DdeFreeDataHandle", "int", $hConv[0]) If $hItem[0] Then DllCall($hDll, "int", "DdeFreeDataHandle", "int", $hItem[0]) If $hTopic[0] Then DllCall($hDll, "int", "DdeFreeDataHandle", "int", $hTopic[0]) If $hServer[0] Then DllCall($hDll, "int", "DdeFreeDataHandle", "int", $hServer[0]) If $iErr[0] Then Return SetError(3, $iErr[0], "") ; Other DDE Errors DllCall($hDll, "int", "DdeUninitialize", "int", DllStructGetData($uIdInst, 1)) DllClose($hDll) If StringRight($sData[0], 3) = ',""' Then $sData[0] = StringTrimRight($sData[0], 3) If $sURL = '' Then $sURL = StringRegExpReplace($sData[0], '^"([^"]*?)".*', '"\1"') If $iRetType = 1 Then Local $sRetTitle = StringReplace(StringTrimLeft($sData[0], StringLen($sURL) + 1), '\"', '"') Local $aRetArr[3] = [$sRetTitle, $sURL, StringReplace($sData[0], '\"', '"') ] Return $aRetArr EndIf Return $sURL EndFunc
  14. Which one? I have tried few, but on the fragment from the first post they are not working.
  15. Something like this? $sJSON = ClipGet() ;This is the json string $aRet = StringRegExp($sJSON, '(?s)("[^"]+": {.*?})', 3) $sFind = 'Fox 2' For $sStr In $aRet If StringRegExp($sStr, '"name": ".*' & $sFind & '.*",') Then $sRep = StringRegExpReplace($sStr, '("x-update-channel-icon": )false', '\1true') $sRep = StringRegExpReplace($sRep, '("x-update-channel-name": )false', '\1true') $sJSON = StringReplace($sJSON, $sStr, $sRep) EndIf Next ConsoleWrite($sJSON & @CRLF)
  16. The idea is to allow to escape not all chars. I disagree (in this case yes, but sometimes no).
  17. Why? You are using it wrong, this param is to specify particular chars to escape... $p = _StringRegExpEscapeChars($sUserPattern_1, "\\\(\)")
  18. The best solution is to escape specials chars: Dim $sText_1 = "C:\Test (example)\Everything" Dim $sUserPattern_1 = "Test (example)\Every" ConsoleWrite(StringRegExp($sText_1, "^.+?" & _StringRegExpEscapeChars($sUserPattern_1) & ".+?$") & @TAB & "No problem here" & @CRLF) Dim $sText_2 = "C:\Test (example)\Fallout" Dim $sUserPattern_2 = "Test (example)\Fall" ConsoleWrite(StringRegExp($sText_2, "^.+?" & _StringRegExpEscapeChars($sUserPattern_2) & ".+?$") & @TAB & "No problem here" & @CRLF) Func _StringRegExpEscapeChars($sString, $sChars = '') If StringStripWS($sChars, 8) = '' Then $sChars = '\]\[<>\^\\.+*?$(){}=!|:' EndIf Return StringRegExpReplace($sString, '([' & $sChars & '])', '\\\1') EndFunc
  19. The problem perhaps is with your keyboard layout set by default, as i see it (from your screenshot), you have Russian system, so probably the default keyboard layout is Russian, to fix it use this (set English as default at start, and reset to the previous one at the end): #include-once #include <WinAPIEx.au3> Global $iKbrdLayout, $aKbrdLayouts OnAutoItExitRegister('__HotKeySendFix_OnExit') __HotKeySendFix_OnStart() Run("notepad.exe") sleep(1000) Send("OK") sleep(1000) Send("^a") send("^c") send("^v") Func __HotKeySendFix_OnStart()     $iKbrdLayout = 0x0409 ;English     $aKbrdLayouts = _WinAPI_GetKeyboardLayoutList()     _WinAPI_LoadKeyboardLayout($iKbrdLayout, $KLF_ACTIVATE) EndFunc Func __HotKeySendFix_OnExit()     For $i = 1 To Ubound($aKbrdLayouts) - 1         If Hex($iKbrdLayout) = Hex('0x' & StringRight($aKbrdLayouts[$i], 4)) Then             Return         EndIf     Next          _WinAPI_UnloadKeyboardLayout($iKbrdLayout) EndFunc
  20. New version(s)... Sorry for delay, but this is the second update since last version, i just forgot to publish it here.
  21. #include <GuiMenu.au3> ; Create GUI. $hGUI = GUICreate("Autoit GUI", 200, 100) ; Create menu and item. Local $menu = GUICtrlCreateMenu("&Click here") GUICtrlCreateMenuItem("none", $menu) $hMenu = _GUICtrlMenu_GetMenu($hGUI) _GUICtrlMenu_SetMenuStyle($hMenu, $MNS_MODELESS) ; Crate label to control progress. Local $label = GUICtrlCreateLabel("Working: ", 60, 30, 160) ; Set start time point script. Local $startPoint = 0 ; Show GUI. GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 ; Set new time to label. GUICtrlSetData($label, "Working: " & $startPoint & "%") ; add point $startPoint += 1 ; When point is above 100 reset If $startPoint >= 100 Then $startPoint = 0 ; Listen signal from GUI. Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd
  22. I didn't tested it yet, but can we pass arrays, objects that way?
  23. Is this implemented in the core of the SciLexer? or it can be done via Lua scripts?
×
×
  • Create New...