Jump to content

mike1950r

Active Members
  • Posts

    237
  • Joined

  • Last visited

Community Answers

  1. mike1950r's post in Enable / Disable Close in Program Button in Taskbar was marked as the answer   
    ok, finally found the solution:
    Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "Ignore", $hGUI1) Do, what has to be done without interuption ... Opt("GUIOnEventMode", 0) That's it.
    Cheers mike
  2. mike1950r's post in Create Object Handling was marked as the answer   
    Thanks KaFu,
    my fear was, that this is double declared, when the library is loaded.
    I found a solution for me putting this on top of the library:
    If Not IsDeclared("objGlo_Video") Then Global $objGlo_Video EndIf object verification works fine now.
    Thanks mike
  3. mike1950r's post in @HotKeyPressed Problem was marked as the answer   
    OK I found, where the problem came from.
    Here is now the working function:
    Func VideoPlayVLCHotKeyPressed() Local $sWindowTitle $sWindowTitle = WindowProcessTitle("vlc.exe") Switch @HotKeyPressed VideoPlayVLCHotKeySetUndo() WinActivate($sWindowTitle, "") Case "{F2}" If _IsPressed("71") Then Send("^{DOWN}") EndIf While _IsPressed("71") Sleep(10) WEnd Case "{F3}" If _IsPressed("72") Then Send("^{UP}") EndIf While _IsPressed("72") Sleep(10) WEnd Case "{F5}" If _IsPressed("74") Then Send("+{LEFT}") EndIf While _IsPressed("74") Sleep(10) WEnd Case "{F6}" If _IsPressed("75") Then Send("+{RIGHT}") EndIf While _IsPressed("75") Sleep(10) WEnd Case "{PAUSE}" Send("{SPACE}") Case "{END}" If NumLockState() = "ON" Then ProcessClose("vlc.exe") Else Send("{NUMLOCK}") EndIf EndSwitch VideoPlayVLCHotKeySet() EndFunc ;==>VideoPlayVLCHotKeyPressed In fact the problem was, that the WinActivate command was written before Switch @HotKeyPressed.
    This must be after Switch @HotKeyPressed.
    May be this window sends out key messages when beeing activated, I don't know.
    However after this changing the function works like it should.
    But the While loop after the toDo is not enough.
    It must also be the If _IsPressed before the toDo.
    Otherwise you get a lot of keystrokes coming in when you release the key.
    OH my ... 🙃
    I think it would be a good modification of the Hotkey procedure to have a switch for treating keystrokes as single keystrokes if needed.
    Thanks to everybody.
    Cheers mike
  4. mike1950r's post in Problem with FileCreateShortcut() and certain urls was marked as the answer   
    Sorry to everybody for my confusion.
    Infact the methode creating an internet shortcut i used was completely wrong.
    Nevertheless it worked for most urls.
    Anyway it must be another procedure like this:
    Func FileCreateInternetShortcut($sUrl, $sFileName, $sWorkingDir, $sIcon) Local $bSuccess, $iSec, $sIni $bSuccess = False $sWorkingDir = StringRegExpReplace($sWorkingDir, "\\+\z", "") & "\" If FileExists($sWorkingDir) Then $sFileName = StringReplace($sFileName, ".url", "") & ".url" $sIni = $sWorkingDir & $sFileName $iSec = "InternetShortcut" $sUrl = StringRegExpReplace($sUrl, "^.*?:/+", "") IniWrite($sIni, $iSec, "URL", $sURL) IniWrite($sIni, $iSec, "IDList", "") IniWrite($sIni, $iSec, "IconFile", $sIcon) IniWrite($sIni, $iSec, "IconIndex", "") $bSuccess = True EndIf Return $bSuccess EndFunc ;==>FileCreateInternetShortcut This is not created by me, I just modified it for my use.
    It creates another type of file not the same like FileCreateShortcut does.
    It accepts all Urls and creates the internet shortcuts like Internet Explorer does.
    The icon part is for those, who download the icon first from the internet sites, like me.
    Anyway, I want to thank everybody for assisting me and leaving me stealing their time.
    Thanks again.
    Cheers mike
    ☺️
  5. mike1950r's post in _FileListToArrayRec How to exclude fles and folders ? was marked as the answer   
    OK,
    found by myself:
    _FileListToArrayRec($sFolderPath, "*|*.txt|$RECYCLE.BIN", $FLTAR_FILES ... Cheers mike
×
×
  • Create New...