
stoyan
Members-
Posts
17 -
Joined
-
Last visited
Everything posted by stoyan
-
The /MaxIterations option is not recognized in the latest (2016-07-22) AU3 stripper executable from https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ This is the content of the Au3Stripper.Log 0.00 AutoIt3 Source Au3Stripper v16.612.1119.1 Copyright © Jos van der Zande July 22,2016 0.00 CommandLine Params$: /renameminimum /maxiterations=8 0.00 lCMD$: 0.00 lCMD$:/renameminimum 0.00 /RenameMinimum 0.00 lCMD$:/maxiterations - Invalid Au3Stripper option: /maxiterations 0.00 lCMD$:8 - Invalid Au3Stripper option: 8 0.00 ============================== Reading Source For Directive ====================================================== 0.00 Ignore Function: onautoitstart 0.00 Ignore Function: onautoitexit 0.00 Directive Params$:
-
Multi-monitor aware window centring function. Can handle various work area setups as outlined below: Those are the variants I've tested. #include <Math.au3> #include <WinAPI.au3> #include <WinAPIConstants.au3> #include <WinAPIGdi.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> Func activeWindowCenter() Const $window = WinGetHandle('[ACTIVE]') Const $monitorInfo = _WinAPI_GetMonitorInfo(_WinAPI_MonitorFromWindow($window)) Const $area[] = [DllStructGetData($monitorInfo[1], 1), DllStructGetData($monitorInfo[1], 3), DllStructGetData($monitorInfo[1], 2), DllStructGetData($monitorInfo[1], 4)] Const $size = WinGetPos($window) If @error Then Return EndIf If BitAND(_WinAPI_GetWindowLong($window, $GWL_STYLE), $WS_MAXIMIZE) Then Return EndIf Const $areaWidth = _Max($area[0], $area[1]) - _Min($area[0], $area[1]) Const $windowOffsetX = ($areaWidth - $size[2]) / 2 Const $x = _Min($area[0], $area[1]) + $windowOffsetX Const $areaHeight = _Max($area[2], $area[3]) - _Min($area[2], $area[3]) Const $windowOffsetY = ($areaHeight - $size[3]) / 2 Const $y = _Min($area[2], $area[3]) + $windowOffsetY WinMove($window, '', $x, $y, $size[2], $size[3], 2) EndFunc Here's simple usage: ; include the definition HotKeySet('#o', 'activeWindowCenter') While 1 Sleep(1000) WEnd
-
Version 4 UUID generator not using COM Object calls: ;Version 4 UUID generator ;credits goes to mimec (http://php.net/uniqid#69164) Func uuid() Return StringFormat('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', _ Random(0, 0xffff), Random(0, 0xffff), _ Random(0, 0xffff), _ BitOR(Random(0, 0x0fff), 0x4000), _ BitOR(Random(0, 0x3fff), 0x8000), _ Random(0, 0xffff), Random(0, 0xffff), Random(0, 0xffff) _ ) EndFunc
-
This is a simple Photoshop Autosaver. It's very far from complete autosave solution, but covers the basics. It's made with English version of Photoshop CS5 in mind. And has the followind limitations: Autosaves only when a Photoshop window or Photoshop undocked document is activeAutosaves only the active documentFixed autosave interval (10 minutes)Doesn't keep backupsThe tray tooltip shows the remaining time in secondsHere is the source Opt('TrayMenuMode', 1) Global Const $photoshop = '[CLASS:Photoshop]' Global Const $document = '[CLASS:OWL.DocumentWindow]' Global Const $interval = (1000 * (60 * 10)) Global $Exit = TrayCreateItem('Exit') Global $start = 0 While True Global $Msg = TrayGetMsg() Switch $Msg Case $Exit ExitLoop EndSwitch Global $delta = TimerDiff($start) Global $remaining = Round(($interval - $delta) / 1000) TraySetToolTip('Next autosave in ' & $remaining & ' seconds') If ($delta > $interval) Then Autosave() $start = TimerInit() EndIf WEnd Func Autosave() If WinActive($photoshop) Or WinActive($document) Then Send('^s') EndIf EndFunc
-
No, I had in mind explicit user definable settings the same way as 'tabchar' is for the indentations. I'm not against standardization of the output. If the source is to be published one can rename his/her 'tidy.ini' file and use the community/dev team agreed defaults. This will result in a kind of output profiles: the "mine" one kept in the ini file and "default" used when no 'tidy.ini' is present.
-
I won't argue on that nor insist. It's a longstanding decision of yours probably justified. Probably this is not the first complain about the output Tidy produces and won't be the last. Every one of us has an unique coding style and satisfy everyone is imposible. It is not about the OS it is about coding style, personal likings and freedom to choose. Let's stick with 8 char tabs because Notepad (Tidy handles it perfectly) and camel cased file and folder names because of Program Files, Documents and Settings, Desktop.ini and Thumbs.db. One can stick it, but I do not. This has nothing to do with the operating system it's all about being you, your likings, being creative, expressing yourself, and be satisfied of the fruits of your labor. Isn't that why tidy.ini is in the first place? This thread is about testing new Tidy not discussing the output so apology for the off-topic.
-
Of course not. This is edge case. On the other hand I'm strongly for a user configurable line ending option. The same way as the tab vs. space indentation. This will complete the white space handling.
-
Unfortunately you аssume LE consistency. LE - mixed;UTF-8+BOM.zip
-
Just for further reference I'm attaching the test files. I can confirm that the two issues are fixed in v 2.2.0.2 Thank you. testcase.zip
-
You totally got it wrong. Semantically and structurally the '<!' has nothing in common with '<!--'. The '<!DOCTYPE ... >' is the whole tag and is the HTML analog of the (pre)processing instruction in the programing. As for the comments the opening is '<!--' and the closing is '-->' no '-'s allowed in between. P.S. Sorry for grumbling about this one-year-old post of yours.
-
One more. Source: #include <Array.au3> If $cmdline[0] > 0 Then _ArrayDisplay($cmdline) EndIfThe result: #include < Array.au3 > f $cmdline[0] > 0 Then _ArrayDisplay($cmdline) ndifNote the include line The source file is UTF-8 with BOM and UNIX LE. Edit: The includes related issue is not LE related.
-
Here's one for real. Consider the following: #include <Array.au3> if $cmdline[0] > 0 Then _ArrayDisplay($cmdline) endifWhen tidied the result is: #include <Array.au3> f $cmdline[0] > 0 Then _ArrayDisplay($cmdline) ndifIf new line is added just before the 'EndIf' the result is #include <Array.au3> f $cmdline[0] > 0 Then _ArrayDisplay($cmdline) ;### Tidy Error: next line creates a negative tablevel. ;### Tidy Error: next line creates a negative tablevel for the line after it. EndIfThe result gets even more devastating the larger the file is. This occurs if and only if the line ending in the target file are UNIX type. Not tried the mixed line endings case. I guess you've got an assumption about the length of the new line white space. Ideally the fix will result in adding a switch in the ini about the preferred line ending char(s). Edit: Or keep them intact altogether.
-
My bug reports a bad, I have to practice. What I meant with the previous port was that with 'endfunc_comment = 0' the output is different then the one with 'endfunc_comment = 1'. The difference is in those two spaces before the comment character. The description in the ini says Added comment To EndFunc statement E.g. "EndFunc ;==>UDF_Name"It wasn't clear to me what to expect when turn this feature on or off.
-
Hello all, here are my observations so far The changes in my tidy.ini endfunc_comment = 0The original code: EndFunc ;==>{function name here}Note the three spaces before the ';' sign. The tidied up code: EndFunc ;==>{fucuntion name here}There is only one space before the ';' sign. I'm really not sure what the expected behavior would be. The same happens with the tidy.exe v.2.1
-
Nope, the bug report has nothing incommon with this case. Thank you all for the help.
-
Ahaa! Listen for the event on the window level. Thank you! May be this bugreport has something in common. АlthoughI couldn't find the mentioned passage in the documentation.
-
Hello, all! I've got a list view control. It has to accepts a drag/dropped files from the Explorer. Then I have to filter them out and populate the list view. The problem is that list view does not file any event in on event mode. At least on my side. The closest thing I found on the forums is this answer. A slightly modified (on message) version is working ok, at least events are being fired. Here is the working (edited from the post above) script: #include <GUIConstants.au3> #include <WindowsConstants.au3> $parent = GUICreate("test",200,200,-1,-1,-1,$WS_EX_ACCEPTFILES) GUICtrlCreateListView("Test",10,10,75,75) GuiCtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() Do $msg = GUIGetMsg() if $msg = $GUI_EVENT_DROPPED then MsgBox(0,"Test",@GUI_DROPID & " " & @GUI_DRAGFILE) endif Until $msg = $GUI_EVENT_CLOSE GuiDelete($parent)Here is the nonworking mine script: #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Opt('GUIOnEventMode', 1) Global Const $title = 'Some descriptive title' Global $treff main() while 1 sleep(5000) wend func main() $treff = GUICreate($title, 500, 385, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, 'handle_close') GUICtrlCreateListView('Column one|Column two', 10, 10, 480, 190, $LVS_NOSORTHEADER) GuiCtrlSetState(-1, $GUI_DROPACCEPTED) GuiCtrlSetOnEvent(-1, 'file_list_event_handler') GUISetState() EndFunc Func handle_close() Switch @GUI_WINHANDLE Case $treff Exit EndSwitch EndFunc Func file_list_event_handler() MsgBox(48, 'Event status', 'The event has fired!') EndFunc I'll need your support. Edit: fixed the link to the other post