Jump to content

Leaderboard

Popular Content

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

  1. Hi, Thank you for your help, I find the reason, during the retrieving of the characteristic of the file the BOM was detected and the size was 0 wwhich lead to a wrong calculation. I fix it for the next Beta/release Cheers
    1 point
  2. 1.) InetGetSource() will directly return STRING data (no need to use BinaryToString()) 2) Use StringSplit() to just split the lines. You split to a 2D array: @crlf delimits lines, | delimits collumns. #include <Inet.au3> #include <Debug.au3> $URL="https://www.dropbox.com/s/oagfd0e314pz3a0/Some-foo-file.txt?dl=1" $Content = _INetGetSource($URL) MsgBox(0,"Content",$Content) $aLines=StringSplit($Content,@CRLF,1) _DebugArrayDisplay($aLines) for $L = 1 to $aLines[0] MsgBox(0,"Line " & $L,$aLines[$L]) Next
    1 point
  3. On the PC with Dropbox client installed right click the file you want to download for further processing -> "copy dropbox link" (German: "Dropbox-Link kopieren") You will receive something like this real world URL (I created and shared a file for you in my Dropbox: https://www.dropbox.com/s/oagfd0e314pz3a0/Some-foo-file.txt?dl=0 Replace the 0 at it's end with a 1: https://www.dropbox.com/s/oagfd0e314pz3a0/Some-foo-file.txt?dl=1 #include <Inet.au3> $URL="https://www.dropbox.com/s/oagfd0e314pz3a0/Some-foo-file.txt?dl=1" $Content = _INetGetSource($URL) MsgBox(0,"Content",$Content) Then use StringSplit() as mentioned by @junkew
    1 point
  4. To retrieve the address of the last used cell in column A use $oRange = $oWorkbook.ActiveSheet.Range("A:A").SpecialCells($xlCellTypeLastCell) $sAddress = $oRange.Address To get the address of the first empty cell in column A simply add +1 to the above range: $oRange = $oWorkbook.ActiveSheet.Range("A:A").SpecialCells($xlCellTypeLastCell).Offset(1) $sAddress = $oRange.Address
    1 point
  5. MrCheese, Doing any kind of manipulation of timer timestamps ususally ends in tears - the returned value from an Init function should only ever be used as the parameter for the corresponding Diff function. The Help file page for TimerInit makes this quite clear and as far as I know it applies to the UDF equivalent as well. Given the number of countdown timer threads on the forum, I am surprised that you have not been able to find a suitable version to use. Here is one I have used in the past: #include <Date.au3> HotKeySet("{ESC}", "_Quit") Example() Func Example() $iDollarMax = 140 ; Units are seconds ; Determine end time $sEnd = _DateAdd("s", $iDollarMax, _NowCalc()) ; Store current second $iSec = @SEC While 1 ; Wait until second changes Do Sleep(10) Until $iSec <> @SEC ; Store new second $iSec = @SEC ; Calculate time difference $iTime2GoSec = _DateDiff("s", _NowCalc(), $sEnd) ; Convert to Min and Sec $iTime2GoMin = Int($iTime2GoSec / 60) $iTime2GoSec = Mod($iTime2GoSec, 60) ; Display result - adding padding 0 to Sec if required ToolTip($iTime2GoMin & ":" & StringFormat("%02i", $iTime2GoSec)) WEnd EndFunc ;==>Example Func _Quit() Exit EndFunc ;==>_Quit I hope that it does what you want - please ask if you have any questions. M23
    1 point
  6. crashdemons

    Rollup Pro v16

    I wrote this application over the last couple of days because a friend was complaining that Windows needed a Roll-up button that minimizes a window to it's titlebar, aside from regular minimize. (Note: you must actually activate a window to see the button.) More than that - this button can be right-clicked to display and change information about a window quickly. The information includes the basics like HWnd, Title, State(using state values, not flags), Transparency, Position, Dimensions and Processname/PID. Note: You can find the Exit option by right-clicking the button as well. ***Grabby Movement*** To change the horizontal placement you can click the "grabby" button and move the mouse until the buttons are placed where you want them and then click the grabby button again to set them there. Current Script Version - 16 RollupPro_16.zip Function Credits: _ReduceMemory - w0uterWinGetTrans* - Valik_ProcessGetName - Process.au3 UDF (Erifash?, Wouter?)_ProcessGetPriority - Process.au3 UDF_Win_TBHeight - Zedna - (v12 and lower - Prog@ndy, WinAPI.au3, Structures.au3)_ProcessSuspend/Resume - The Kandie Man_WinAPI_GetAncestor - PaulIA - WinAPI.au3_WinAPI_GetClassName - PaulIA - WinAPI.au3_WinAPI_PtInRect - PaulIA - WinAPI.au3_WinAPI_GetWindowRect* - PaulIA - WinAPI.au3* notes a function was modified in operation slightly. 5-5-13 Edit: fixed posted images.
    1 point
  7. First off all thank You Larry and Ezzetabi. My programm based on Yours code. This is simple programm, but could be usefull for somebody. When You click on window title, window rollup or rolldown. AutoItSetOption ("MouseCoordMode", 0) Global $hwnd, $title Global $Win_HWND[100], $Win_Size[100] $wCount = 0 $hwnd = WinGetHandle("") $title = WinGetTitle($hwnd) While 1 ;------------- One Left mouse click detect----------------- If _IsPressed('01') = 1 Then ; LEFT Click Sleep(250) If _IsPressed('01') = 0 Then ; LEFT Click Release -> RollUp $pos = MouseGetPos() If $pos[0] > 22 AND $pos[1] < 25 Then CheckHWND($hwnd) Else While _IsPressed('01') Sleep(250) WEnd EndIf EndIf ;----------------------------------------------------------- SetTitle($hwnd,$title) $newhwnd = WinGetHandle("") If Not @Error And $newhwnd <> $hwnd Then WinSetTitle($hwnd,"",$title) $hwnd = $newhwnd $title = WinGetTitle($hwnd) EndIf Sleep(200) WEnd ;------------------------------- Func SetTitle($h,$t) WinSetTitle($h,"",$t & " < " & @hour & ":" & @min & ":" & @sec & " >") EndFunc ;------------------------------- Func CheckHWND($hwnd) $hwnd = WinGetHandle("") $size = WinGetPos("") If $size[3] = 27 then For $count = 0 to $wCount If $Win_HWND[$count] = $hwnd Then $size[3] = $Win_Size[$count] WinMove($hwnd, "", $size[0], $size[1], $size[2], $size[3]) $Win_HWND[$count] = $Win_HWND[$wCount] $Win_Size[$count] = $Win_Size[$wCount] $wCount = $wCount - 1 ExitLoop EndIf Next Else $Win_HWND[$wCount] = $hwnd $Win_Size[$wCount] = $size[3] $wCount = $wCount + 1 WinMove($hwnd, "", $size[0], $size[1], $size[2], 27) EndIf EndFunc ;------------------------------- Func OnAutoItExit() WinSetTitle($hwnd,"",$title) For $count = 0 to $wCount $hwnd = $Win_HWND[$count] WinActivate($hwnd) $size = WinGetPos("") $size[3] = $Win_Size[$count] WinMove($hwnd, "", $size[0], $size[1], $size[2], $size[3]) Next AutoItSetOption ("MouseCoordMode", 1) Exit EndFunc ;------------------------------- Func _IsPressed($hexKey) Local $aR, $bRv ;$hexKey $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc Alexz TitleBarClock2.au3
    1 point
×
×
  • Create New...