Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/02/2019 in all areas

  1. rcmaehl

    Steam Library UDF

    Hi all, I've recently needed to be able to catalog Programs on my system and Steam is a pain to do. So here's the UDF I've made. FAQ Q1: Isn't this game related? A1: It's borderline, yes, so much so I cleared it with M23 before posting Q2: Can you add X function that does X with the Steam API? A2: No Q3: Can you add X function that does X with games? A3: No Q4: Can you add X function that doesn't meet the above criteria? A4: No, just to be safe anyway Q5: Why doesn't this get me the .exe!? A5: See Q3 UDF https://github.com/rcmaehl/_GetSteam
    1 point
  2. I suggest to always set the format property to the correct format: BodyFormat=$olFormatHTML HTMLBody="... HTML mail ..." So Outlook doesn't use a default for BodyFormat or has to guess which format to use.
    1 point
  3. _OL_Close ends Outlook if it wasn't up and running at _OL_Open time. You could set $__bOL_AlreadyRunning = True _OL_Close($oOL) to simulate that Outlook hasn't been started by your script.
    1 point
  4. Here something to start you up #include <Constants.au3> #include <GUIConstants.au3> Opt("MustDeclareVars", 1) MsgBox ($MB_SYSTEMMODAL,"",MonthCalendar()) Func MonthCalendar($iLeft = -1, $iTop = -1) Local Const $asMonth[12] = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Août", "Sep", "Oct", "Nov", "Déc"] Local Const $cHighlight = 0xD6E0FF Local $hGUI = GUICreate("", 250, 150, $iLeft, $iTop, $WS_POPUP + $WS_BORDER) Local $iPrev = GUICtrlCreateLabel(ChrW(0x25C0), 25, 15, 25, 25, $SS_CENTER) GUICtrlSetFont(-1, 16) Local $iNext = GUICtrlCreateLabel(ChrW(0x25B6), 205, 15, 25, 25, $SS_CENTER) GUICtrlSetFont(-1, 16) Local $iYear = GUICtrlCreateLabel(@YEAR, 100, 21, 50, 25, $SS_CENTER) Local $aiMonth[12], $i = 0 For $y = 0 To 2 For $x = 0 To 3 $aiMonth[$i] = GUICtrlCreateLabel($asMonth[$i], 50 * $x + 38, 30 * $y + 50, 30, 20, $SS_LEFT + $SS_CENTERIMAGE) GUICtrlSetFont(-1, 10) $i += 1 Next Next $i = Int(@MON) - 1 GUICtrlSetBkColor($aiMonth[$i], $cHighlight) Local $iOK = GUICtrlCreateDummy () Local $aAccelKeys[1][2] = [["{ENTER}", $iOK]] GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) Local $nMsg While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete () Return ("") Case $iPrev GUICtrlSetData($iYear, GUICtrlRead($iYear) - 1) Case $iNext GUICtrlSetData($iYear, GUICtrlRead($iYear) + 1) Case $aiMonth[0] To $aiMonth[11] If $i = $nMsg - $aiMonth[0] Then ContinueLoop GUICtrlSetBkColor($nMsg, $cHighlight) GUICtrlSetBkColor($aiMonth[$i], Default) $i = $nMsg - $aiMonth[0] Case $iOK Local $sReturn = GUICtrlRead($iYear) & "|" & $i + 1 GUIDelete() Return $sReturn EndSwitch WEnd EndFunc ;==>MonthCalendar
    1 point
  5. So many ways to skin this cat ... $s = " monsteri - 12345 " ; the numbers are what i need $r1 = StringRegExpReplace($s, '.*?(\d+).*', "$1") Msgbox(0,"", $r1) ; just replace all the letters and - and just show the numbers $r2 = StringRegExpReplace($s, '\D', "") Msgbox(0,"", $r2)
    1 point
  6. @_leo_ You should check the value of @error following the call the the webdriver functions. I suspect that the element isn't being found because there are multiple classes involved. You would need to switch to using the Contains function for each class or maybe switching to using CSS for the selector instead of xpath. Also, you should watch the results that appear in the Scite output panel and use that as a way to screen your scripts success or failure when executing the webdriver functions.
    1 point
  7. Trong

    IECreateEmbedded issue

    Eg for IE11 installed (no UDF version): #include <IE.au3> #include <Process.au3> Local $regValue = "0x2AF8" ; IE11 edge mode: 11001 (0x2AF9) ; IE11: 11000 (0x2AF8) ; IE10: 10001 (0x2711) ; IE10: 10000 (0x02710) ; IE 9: 9999 (0x270F) ; IE 9: 9000 (0x2328) ; IE 8: 8888 (0x22B8) ; IE 8: 8000 (0x1F40) ; IE 7: 7000 (0x1B58) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) ;~ RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", @ScriptName, "REG_DWORD", $regValue) ;~ RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION",@ScriptName, "REG_DWORD", $regValue) Global $mainwin = GUICreate("IE test", 968, 688) Global $OBJECT = ObjCreate("Shell.Explorer.2") Global $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 968, 688) GUISetState() _IENavigate($OBJECT, "http://www.whatsmyuseragent.com/") ;~ _IENavigate($object, "http://www.pinterest.com/") While 1 Sleep(10) If GUIGetMsg() = -3 Then ExitLoop WEnd
    1 point
×
×
  • Create New...