Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/07/2020 in all areas

  1. JLogan3o13

    Hiding processes

    OMG why are you responding to a topic that is 14 years old?! Please don't resurrect old ancient topics, especially when not adding anything to the discussion.
    2 points
  2. String funcs are not so bad... #include <Array.au3> Local $all[0][3] $teams = StringRegExp($Source, '(?s)<table class="teams">(.*?)</table>', 3) For $i = 0 to UBound($teams)-1 $res = StringRegExp($teams[$i], '(?s)(winner|loser).*?html">([^<]+).*?(\d+)', 3) $tmp = $res[0] & "|" & $res[1] & "|" & $res[2] & @crlf & $res[3] & "|" & $res[4] & "|" & $res[5] & @crlf _ArrayAdd($all, $tmp) Next _ArrayDisplay($all)
    2 points
  3. Musashi

    RegExp Date time

    Local $sInput = "Date Line 01 = 21.07.2019;14:12:10 " & @CRLF & _ "Date Line 02 = 29.03.2014;03:04:59 " & @CRLF & _ "Date Line 03 = 03.12.2013;22:41:15 " Local $sOutput = StringRegExpReplace($sInput, "(\d{2})\.(\d{2})\.(\d{4});(\d{2}):(\d{2}):(\d{2})", "\3-\2-\1 \4:\5:\6") ConsoleWrite($sInput & @CRLF & @CRLF) ConsoleWrite($sOutput & @CRLF)
    1 point
  4. Marc

    RegExp Date time

    One possible solution: $input = "21.07.2019;14:12:10" $output = StringRegExpReplace($input, "(\d\d)\.(\d\d)\.(\d\d\d\d);", "\3-\2-\1 00:00:00") ConsoleWrite($output) best regards, Marc
    1 point
  5. @SOCCERMOMMY That should get you fast started : #include <Constants.au3> #include <IE.au3> #include <Array.au3> Opt ("MustDeclareVars", 1) Local $oIE = _IECreate ("https://www.basketball-reference.com/boxscores/?month=01&day=5&year=2020") Local $oEast = _IEGetObjById ($oIE, "divs_standings_E") Local $aEast = _IETableWriteToArray ($oEast, True) _ArrayDisplay ($aEast) Local $oWest = _IEGetObjById ($oIE, "divs_standings_W") Local $aWest = _IETableWriteToArray ($oWest, True) _ArrayDisplay ($aWest) Enjoy !
    1 point
  6. np: If you want to wait for the window then you can use while loop example (untested): Used ControlClick as this is a better option then MouseClick. Local $iCheckOut, $aCheckOut[2] = ["this is an apple", "this is an orange"] While 1 If WinExists($aCheckOut[0], "") Then WinActivate($aCheckOut[0], "") ControlClick($aCheckOut[0], "", "", "Left",1, 22,22) $iCheckOut = 0 ExitLoop ElseIf WinExists($aCheckOut[1], "") Then WinActivate($aCheckOut[1], "") ControlClick($aCheckOut[1], "", "", "Left",1, 22,22) $iCheckOut = 1 ExitLoop EndIf Sleep(100) WEnd MsgBox(4096, "Checkout", "Checkout Window = " & $aCheckOut[$iCheckOut])
    1 point
  7. You don't need the While loop For $cartcheckout = 0 to 1 $checkout = $array[$cartcheckout] if WinActivate($checkout,"") then mouseclick("Left",22,22,1) elseif WinWaitNotActive($checkout,"") then sleep(20) EndIf next
    1 point
  8. What follows also tries to improve the speed of _GUICtrlListView_GetItemText() and _GUICtrlListView_SetItemText() ... by not calling them directly from GuiListView.au3 I'm experimenting a function _BufferCreate() that will create once only the buffer & pointers involving my Listview needs. This function will be called only once, from any function that requires it first (it could be export phase, numeric & string sorts, natural sort etc...), which means that the buffer will always stay opened during the whole script (as soon as it is created) and reused by any function that requires it. Could it be a dangerous way of scripting ? Plenty of tests will give the answer. Because if I don't do that, the same following code will appear at least 3 times within the script, making it bigger & bigger and harder to maintain As the variable $g_idListView isn't defined until a csv file is imported, then I'll have to create global variables within the function (though it may be better to define them global at the beginning of the script, then assign their values in this function, we'll see) Global $g_bBufferExist = False ... ;============================================ Func Export_csv() If Not $g_bBufferExist Then _BufferCreate() ... EndFunc ;==>_Export_csv ;============================================ Func AnyFunc_ThatNeedsIt If Not $g_bBufferExist Then _BufferCreate() ... EndFunc ;==>AnyFunc_ThatNeedsIt ;============================================ Func _BufferCreate() Global $g_bUnicode = GUICtrlSendMsg($g_idListView, $LVM_GETUNICODEFORMAT, 0, 0) <> 0 Global $g_InsertItem = ($g_bUnicode ? $LVM_INSERTITEMW : $LVM_INSERTITEMA) Global $g_SetItem = ($g_bUnicode ? $LVM_SETITEMW : $LVM_SETITEMA) Global $g_GetItemText = ($g_bUnicode ? $LVM_GETITEMTEXTW : $LVM_GETITEMTEXTA) Global $g_SetItemText = ($g_bUnicode ? $LVM_SETITEMTEXTW : $LVM_SETITEMTEXTA) Global $g_tBuffer = DllStructCreate(($g_bUnicode ? "wchar Text[4096]" : "char Text[4096]")) Global $g_tItem = DllStructCreate($tagLVITEM) Global $g_pItem = DllStructGetPtr($g_tItem) DllStructSetData($g_tItem, "Text", DllStructGetPtr($g_tBuffer)) DllStructSetData($g_tItem, "TextMax", 4096) $g_bBufferExist = True EndFunc ;==>_BufferCreate Exported files using this function (found in script a.au3 for example) will be compared to exported files not using it (script b.au3 for example). Let's cross fingers that files exported will be exactly the same after the same treatment has been applied to them (sort, headers drag, export etc...) . Beyond Compare will check that, To be continued...
    1 point
  9. n1kobg

    Hiding processes

    OMG why everyone is assuming that you want to hide a process for a virus?! I want to use it to hide an external exe that i start with my program, i dont want some pleb to use my files (virtualization doesnt work the way its written, or maybe idk how). I wont start with why i use external exe instead of using the script. There are a number of benefits. Now im forced not to include a window and limit it to just brief commands & AntiVirs to mark this as trojan. NICE !!!
    0 points
×
×
  • Create New...