Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/09/2017 in all areas

  1. Jos

    doubt about FileInstall

    Just open with ResHacker and look at RCDATA,999 as indicated by the console message when compiling the script or run a script like this: #AutoIt3Wrapper_Res_SaveSource=y ; To extract the source #include<ResourcesEx.au3> $InputEXE = "test.exe" $sResNameOrID=999 $sFilePath="extracted_source.au3" $rc=_Resource_SaveToFile($sFilePath, $sResNameOrID,$RT_RCDATA,Default,Default,$InputEXE) ConsoleWrite('$rc= = ' & $rc & ' >Error code: ' & @error & @CRLF) This requires the include made by @guinness : Jos
    2 points
  2. Functions can not be nested. They must exist on their own.
    1 point
  3. Hi. There is a second EndFunc below EndFunc of _FatalError(). Take this and put it above Func MessageBroadcast(). You nested these two Func inside (at the end of a) Func. Give it a try. I couldn't test anything. Just watching the code. Conrad
    1 point
  4. Hi. Welcome to the forum. You can loop a "while 1 - wend" and wait for pressing the button. If button is pressed run DownloadSpeed() and update the edit: #include <GuiConstants.au3> GUICreate("SpeedTest") GUICtrlCreateDummy() Local $hSpeedTestButton = GUICtrlCreateButton("Test Download Speed", 10,50,120,35) Local $hSpeedTestLabel = GUICtrlCreateLabel("", 170, 57, 190, 20) GUISetState(@SW_SHOW) Local $msg Local $iSpeed While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $hSpeedTestButton GUICtrlSetData($hSpeedTestLabel, "") $iSpeed = DownloadSpeed() GUICtrlSetData($hSpeedTestLabel, "Download Speed is: " & $iSpeed) EndSwitch Sleep(10) WEnd Func DownloadSpeed() SplashTextOn("Wait", "Download-Test running...", 300, 50) Local $Download = "http://bitdefender.com/tv" Local $TempFile = @TempDir & "\Temp.temp" Local $Size = InetGetSize($Download) If $Size = 0 Then Return "(Not Connected)" Local $Time = TimerInit() Local $Success = InetGet($Download, $TempFile, 1, 0) If $Success = 0 Then Return "(Not Connected)" $Time = TimerDiff($Time) Local $Rate = ($Size / $Time) FileDelete($TempFile) SplashOff() Return Round($Rate) & " KB/Sec" EndFunc I inserted a splash while waiting. Conrad
    1 point
  5. What about only testing $4 for items with a single number followed by a colon, and then replacing those with the format desired? Is there a way to make the latter part optional to the whole of the regex, so they are matched independently of one another? currently i can do one or the other, but i cant believe JG is going to be relegated to two regexes Local $sString $sString &= '19,"9/4/2017 3:19:57 PM","-2:00",,"Screen","7000",,B7fspf' & @CRLF $sString &= '20,"9/4/2017 6:19:58 PM","-2:00",,"Screen","7710",,qmhkNN' & @CRLF $sString &= '21,"9/12/2017 7:20:27 PM","-2:00",,"Screen","9990",,9ui/GX' & @CRLF $sString &= '22,"12/4/2017 8:32:53 PM","-2:00",,"Screen","7710",,J4jAYc' & @CRLF $sString &= '23,"9/5/2017 9:22:02 AM","-2:00",,"Screen","9900",,nSI+V0' & @CRLF $sString &= '24,"9/5/2017 10:22:05 AM","-2:00",,"Alarm: 9538",,,j8V9qI ' & @CRLF $sString &= '25,"9/5/2017 11:22:05 AM","-2:00",,"Screen","7710",,C2fSO3' & @CRLF $sString &= '26,"9/5/2017 12:22:08 AM","-2:00",,"Screen","9900",,jmwr/j' $sString = StringRegExpReplace($sString, '(\d+)/(\d+)/(\d+)\W(\d):', "$3/$1/$2 0$4:") ConsoleWrite($sString &@CRLF)
    1 point
  6. Sure, i'll try..if i have some results i'll post here...but i have many doubt about it, don't know if i have a good knowledge
    1 point
×
×
  • Create New...