Jump to content
Sign in to follow this  
cdude

GUI Tracer or Log window/tooltip?

Recommended Posts

Hi again,

this is another beginner question and I was wondering what the best way is (assuming I'm using the AutoIT ActiveX component within VBA)

to display some kind of scrolling log window or tooltip or some kind of GUI which I can trace out my commands to as my script runs and controls various applications in Windows.

Preferably this method would allow me to print debug messages to a floating tooltip or scrolling log window which is semi-transparent, (programmatically)positionable on screen and which does not receive focus or mouse clicks as I trace to it so that it doesn't mess up timing of complex controlling using AutoIT.

This would go a long way in helping me debug and solidify my AutoIT scripts and make them more reliable. I am under the impression that any GUI features AutoIT provides, are not available/exposed in the ActiveX version of AutoIT? Is this so?

If so, how best would one do what I am asking here?

thanks again! :)

Cdude

Share this post


Link to post
Share on other sites

I was thinking you could create a standalone console, with some kind of Gui Message Receive function that would update the edit box with incoming text, then from vba you could use SendMessage or something similar to send text to the console program.

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

GuiCreate("Console", 400, 230)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE")

GUISetState (@SW_SHOW)

GuiCtrlCreateEdit("", 5,5,390,170)
$slider = GuiCtrlCreateSlider(5, 195, 200)
GUICtrlSetOnEvent(-1, "SetTrans")
GUICtrlSetData (-1, 100)

GuiCtrlCreateLabel("Transparency",70,180)


While 1
    Sleep(10)
Wend
    
Func SetTrans()
    ConsoleWrite(GuiCtrlRead($slider) & "%" & @CRLF)
    ConsoleWrite(GuiCtrlRead($slider) * 2.55 & @CRLF)
    WinSetTrans("", "", GuiCtrlRead($slider) * 2.55)
EndFunc

Func CLOSE()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

I was thinking you could create a standalone console, with some kind of Gui Message Receive function that would update the edit box with incoming text, then from vba you could use SendMessage or something similar to send text to the console program.

Thanks I'll try that. :)

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...