Jump to content

3.1.0++


jpm
 Share

Recommended Posts

Uploaded 15P with Sven Correction on COM

Removed : COM boolean support. It breaks current scripts that uses the Shell Object.

Modified : DllCall() so it will accept an empty idispatch-type parameter.

Link to comment
Share on other sites

  • Replies 125
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You are correct, the STD I/O functionality doesn't give you a way to write to AutoIt's own STDOUT...

Have you tried the ConsoleWrite() function? It's used to write output that SciTE can capture,  I don't know if it'll work for BartPE...

<{POST_SNAPBACK}>

No I had not tried that. Thanks for the idea. I had looked at it before but due to the way it is worded was unsure if it would work for my purposes.
Link to comment
Share on other sites

Documentation error in AutoIt3.1.0.15P.zip helpfile for ObjGet:

Remarks

The filename is optional if you want to use only the class name, but the parameter

can't be omitted. Use an empty string if you only want to use the classname.

Like: $Object = ObjGet("","Excel.App")

Should be: ObjGet("","Excel.Application")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

More trouble with ObjGet... after opening an Excel Object using the filename, the resulting object fails with the 'Visible' method:

$oExcel = ObjGet("c:\\ToDo.xls")
if IsObj($oExcel) then
    $oExcel.Visible = 1
else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif
exit

Output:
>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "C:\AutoItScripts\xx.au3"  
C:\AutoItScripts\xx.au3 (10) : ==> The requested action with this object has failed.: 
$oExcel.Visible = 1 
$oExcel.Visible = 1^ ERROR
>Exit code: 0   Time: 1.997

If I use an ObjCreate instead, the resulting object respons to the Visible method as expected:

$oExcel = ObjCreate("Excel.Application")
if IsObj($oExcel) then
    $oExcel.Visible = 1
    Msgbox (0,"Excel File Test","Test")
else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif
exit

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

GUICtrlSetGraphic questions:

1) Can the "size" of $GUI_GR_DOT be changed? I'd like a single pixel as a dot.... and GUICtrlSetGraphic(-1,$GUI_GR_RECT, $x,$y, 1,1) does NOT work...

2) Can a $GUI_GR_RECT be resized after it is created?

#include <GuiConstants.au3>
GuiCreate("GuiBuilder....maybe", 300, 200)

$gg = GuiCtrlCreateGraphic(0, 0, 800, 600)
GuiCtrlSetState($gg, $GUI_DISABLE);make button detect clicks
For $x = 0 to 300 step 10
    For $y = 0 to 200 step 10
        GUICtrlSetGraphic(-1,$GUI_GR_DOT, $x, $y)
    Next
Next

$button = GuiCtrlCreateButton("Button", 20, 50, 100, 30)

guiSetState()
While 1
    $msg = guiGetmsg()
    If $msg = $gui_event_close then Exit
    If $msg = $button Then Msgbox(4096,"info","Button was clicked")
Wend
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

More trouble with ObjGet... after opening an Excel Object using the filename, the resulting object fails with the 'Visible' method:

$oExcel = ObjGet("c:\\ToDo.xls")
if IsObj($oExcel) then
    $oExcel.Visible = 1
else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif
exit

Output:
>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "C:\AutoItScripts\xx.au3"  
C:\AutoItScripts\xx.au3 (10) : ==> The requested action with this object has failed.: 
$oExcel.Visible = 1 
$oExcel.Visible = 1^ ERROR
>Exit code: 0   Time: 1.997

If I use an ObjCreate instead, the resulting object respons to the Visible method as expected:

$oExcel = ObjCreate("Excel.Application")
if IsObj($oExcel) then
    $oExcel.Visible = 1
    Msgbox (0,"Excel File Test","Test")
else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif
exit

<{POST_SNAPBACK}>

Dale,

This is not an AutoIt fault. It doesn't work either in VBS.

In the first script you open an Excel Worksheet Object, in the second script an Excel Application object.

An Excel Document can't be set to visible if the application isn't visible.

Regards,

-Sven

Link to comment
Share on other sites

GUICtrlSetGraphic questions:

1)  Can the "size" of $GUI_GR_DOT be changed?  I'd like a single pixel as a dot....  and GUICtrlSetGraphic(-1,$GUI_GR_RECT, $x,$y, 1,1) does NOT work...

2)  Can a $GUI_GR_RECT be resized after it is created?

#include <GuiConstants.au3>
GuiCreate("GuiBuilder....maybe", 300, 200)

$gg = GuiCtrlCreateGraphic(0, 0, 800, 600)
GuiCtrlSetState($gg, $GUI_DISABLE);make button detect clicks
For $x = 0 to 300 step 10
    For $y = 0 to 200 step 10
        GUICtrlSetGraphic(-1,$GUI_GR_DOT, $x, $y)
    Next
Next

$button = GuiCtrlCreateButton("Button", 20, 50, 100, 30)

guiSetState()
While 1
    $msg = guiGetmsg()
    If $msg = $gui_event_close then Exit
    If $msg = $button Then Msgbox(4096,"info","Button was clicked")
Wend

<{POST_SNAPBACK}>

1) No but I see you want to have a smaller builder size so I will create $GUI_GR_SMALLDOT or something like that. Let me think.

2) NO again the size of the graphic are those given at define time. So you need to delete and recreate the whole graphic. You can have several independent graphics in the same window. :)

Edit for GUI builder $GUI_GR_PIXEL

Edited by jpm
Link to comment
Share on other sites

An Excel Document can't be set to visible if the application isn't visible.

<{POST_SNAPBACK}>

Oh, I get it. Sorry. Looking at a VBA reference I see that the following is what is needed (it is apparently a Workbook object that is opened):

$oExcelWB = ObjGet("c:\\ToDo.xls")
$oExcelWB.Windows(1).Visible = 1
$oExcelWB.Application.Visible = 1

I think this would be a nice example to get added to the ObjGet help... I think this is not very intuitive and would be a common task (there is a thread in the V3 support forum right now that this is a good solution for).

The ObjGet by filename example currently in help is cool, but this one would be more useful in my opinion. I've fleshed it out using the style in the current example -- feel free to cut and paste if you agree:

; Example getting an Object using a file name
;
; An Excel file with filename WorkBook.xls must be created in the root directory
; of the C:\ drive in order for this example to work.

$FileName="C:\WorkBook.xls"

if not FileExists($FileName) then
  Msgbox (0,"Excel File Test","Can't run this test, because you didn't create the Excel file "& $FileName)
  Exit
endif

; Mind the double (!) backslashes in this line 
$oExcelWB = ObjGet("c:\\WorkBook.xls")   ; Get an Excel Object from an existing filename

if IsObj($oExcelWB) then
    $oExcelWB.Windows(1).Visible = 1; Set the first worksheet in the workbook visible
    $oExcelWB.Application.Visible = 1; Set the application visible (without this Excel will exit)
else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

15Q Uploaded for CyberSlug Builder and others...

<{POST_SNAPBACK}>

I see no dots; what am I doing wrong? (I am using the latest version of AutoIt3.exe and GuiConstants.au3)

#include <GuiConstants.au3>
;;;$GUI_GR_PIXEL        = 18
GuiCreate("Where are the dots?", 300, 200)

$gg = GuiCtrlCreateGraphic(0, 0, 800, 600)
For $x = 0 to 300 step 10
    For $y = 0 to 200 step 10
        GUICtrlSetGraphic(-1, $GUI_GR_PIXEL, $x, $y)
    Next
Next

guiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
Wend
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

:)

I see no dots; what am I doing wrong?  (I am using the latest version of AutoIt3.exe and GuiConstants.au3)

#include <GuiConstants.au3>
;;;$GUI_GR_PIXEL        = 18
GuiCreate("Where are the dots?", 300, 200)

$gg = GuiCtrlCreateGraphic(0, 0, 800, 600)
For $x = 0 to 300 step 10
    For $y = 0 to 200 step 10
        GUICtrlSetGraphic(-1, $GUI_GR_PIXEL, $x, $y)
    Next
Next

guiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
Wend

<{POST_SNAPBACK}>

I don't know what I did wrong in the merge I will upload a 15R version mine local version is working fine. :D

EDIT I did not update the merge version only the Gui one now 15R available

Edited by jpm
Link to comment
Share on other sites

Just a little blurp: glad to see you working on AutoBuilder CS!

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Question:  Labels are now transparent.... How can I make non-transparent labels?

Screenshot showing how I preferred the old behavior for GuiBuilder:

<{POST_SNAPBACK}>

my goodness!!! so much effort i should have imagine we need both

to be serious

by forcing the backcolor

Link to comment
Share on other sites

by forcing the backcolor

<{POST_SNAPBACK}>

:D I was overlooking the obvious :) Thanks, again!

Oh, and I can use the GuiFontAndColors.au3 so the label color will match the window color (i.e., $ButtonFaceColor)

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Tooltip flicker problem :)

I don't know exacly when the flicker problem was introduced.... EDIT: The changelog mentions a tooltip improvement in AutoIt3.1.0.15H

AutoIt3.1.0.15Gx works correctly (no flicker)

AutoIt3.1.0.15P has the flicker problem

The following code never used to flicker, but now it does:

While 1
    sleep(10)
    ToolTip("This never used to flicker...but now it does!", 0,0)
Wend

The following *also* flickers now:

Dim $t
While 1
    sleep(10)
    If $t <> @HOUR & ":" & @MIN & ":" & @SEC Then
        $t = @HOUR & ":" & @MIN & ":" & @SEC
        ToolTip($t, 0,0)
    EndIf
Wend
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Tooltip flicker problem  :)

I don't know exacly when the flicker problem was introduced....  EDIT:  The changelog mentions a tooltip improvement in AutoIt3.1.0.15H

AutoIt3.1.0.15Gx works correctly (no flicker)

AutoIt3.1.0.15P has the flicker problem

The following code never used to flicker, but now it does:

While 1
    sleep(10)
    ToolTip("This never used to flicker...but now it does!", 0,0)
Wend

The following *also* flickers now:

Dim $t
While 1
    sleep(10)
    If $t <> @HOUR & ":" & @MIN & ":" & @SEC Then
        $t = @HOUR & ":" & @MIN & ":" & @SEC
        ToolTip($t, 0,0)
    EndIf
Wend

<{POST_SNAPBACK}>

You're right, it is bugged. It seems theres something in the code causing it to destroy the window every time instead of re-using it like its supposed to be doing. I'll see about fixing it soon.

Edit: Dumb mistake. I saw it this time when I looked at the code. I'll upload a new version later.

Edited by Valik
Link to comment
Share on other sites

3st April 2005 - v3.1.0.15S (unstable)

Fixed : GUICtrlState(@SW_MAXIMIZE or @SW_RESTORE) (Thanks CyberSlug/Holger).

Fixed : Tip flickering (Thanks CyberSlug/Valik)

Link to comment
Share on other sites

6th April 2005 - v3.1.0.15T (unstable)

Fixed :     Doc missing TraySetOnEvent, TraySetItemOnEvent, TraySetToolTip TrayOnEventMode (Sorry Holger).

Added : Opt("GUISpecialEventMode',1) to suppress window action when clicking on Minimize,restore or Maximize buttons (Thanks CyberSlug).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...