Sign in to follow this  
Followers 0
caramen

Console use

5 posts in this topic

#1 ·  Posted (edited)

Hello guys :

I wanna learn how to use a console to be able to see what is happening in the script while it is happening.

 

Here is the code :

#include <MsgBoxConstants.au3>

Global $Var01 = 01

While 1

Message01 ()


WEnd


Func Message01 ()



   Local $iTimeout = 10
   MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after " & $iTimeout & " seconds or select the OK button.", $iTimeout)

   $Var01 = $Var01 + 1

EndFunc

What does i have to read to do that ?

I whould like to see in a stand alone console what the code is doing... 

Edited by caramen

Share this post


Link to post
Share on other sites



You mean in the SciTE console using ConsoleWrite?


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

No i mean a console like a chat but as a console...

i did something like this right now but this is not what i want

#include <MsgBoxConstants.au3>

Global $Console = GUICreate("Console", 200, 200)
$ConsoleInfo01 = GUICtrlCreateLabel("test 01", 40, 40)

GUISetState(@SW_SHOW, $Console)

Global $Var01 = 01

While 1
   Message01 ()
WEnd




Func Message01 ()

   Local $iTimeout = 10
   MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after " & $iTimeout & " seconds or select the OK button.", $iTimeout)

   $Var01 = $Var01 + 1

GUICtrlSetData($ConsoleInfo01, "biloute" & $Var01 )

EndFunc

i want a console like a chat if a new step is initiated by the script i whant to see the last action in the first line ... like a chat box

Plz help me :(

Edited by caramen

Share this post


Link to post
Share on other sites

I got it right now :)

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.12.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <MsgBoxConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <File.au3>

Opt("GUIOnEventMode", 1)


Global $Console = GUICreate("Console", 200, 200)
Global $Var01 = 01


Global $ConsoleArea = GUICtrlCreateListView("", 10,10 , 180, 180, $LVS_LIST , $WS_EX_STATICEDGE)
_GUICtrlListView_SetColumnWidth($ConsoleArea, 0, 180)
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")
;~ $ConsoleInfo01 = GUICtrlCreateLabel("test 01", 40, 40)

GUISetState(@SW_SHOW, $Console)



While 1
   Message01 ()
WEnd




Func Message01 ()

   Local $iTimeout = 10

   Sleep (1000)

   $Var01 = $Var01 + 1

   _GUICtrlListView_AddItem($ConsoleArea,"Numero de la variable = "& $Var01)


EndFunc

But i still need some help i cant get a style that do what i want ....

I need to not scroll the Gui to see the last action.

any help ?

Share this post


Link to post
Share on other sites

Not sure what you mean, as I do not see any scrolling done in your example. I could be mistaken, but I've tested 3-4 times.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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  
Followers 0