sonatta

how to basic print on gui?

13 posts in this topic

#1 ·  Posted

im trying to to print activities on gui.. 

this is what im trying to   . note: this is edited in paint..

V1owaCE.png

 

im kinda new to autoit scripting. i hope you guys help me

$Gui = GUICreate("autoit activity console", 276, 380)
$output1=GUICtrlCreateLabel('', 21, 34, 204, 198)

GUISetState ()
While 1
   $msg = GUIGetMsg()
   Select
       Case $msg = -3
           Exit
   EndSelect
WEnd

HotKeySet ("{pgup}", "Start")
HotKeySet ("{pgdn}", "_Exit")

func Start()
while 1
mouseclick ("left")
guictrlsetdata($output1, "you use mouseclick",)

Send("{f5}")
guictrlsetdata($output1, "pressed f5")

Mousedown ("right")
guictrlsetdata($output1, "right click down for 2sec")
sleep (2000)


mouseup ("right")
guictrlsetdata($output1, "right click down for 2sec")
sleep (2000)

wend
endfunc

Func _Exit()
Exit
EndFunc

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

sonata,

We do not support keylogging - which appears to be essentially what you are trying to do. Please explain why you need to do this.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

hi, i dont know why how it become keylogging..  im  trying to make gui so i can see what my autoit current activity.. so i can monitor what is wrong if something bad happened to my code.....  its very similar to autohotkey when you click your mouse to taskbar it will show whats your script currently doing :)

Share this post


Link to post
Share on other sites

#4 ·  Posted

8Qf5s2O.png

Share this post


Link to post
Share on other sites

#5 ·  Posted

AutoIt provides many different ways to debug your code.
Details can be found in the FAQs, Chapter 1: https://www.autoitscript.com/wiki/FAQ


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

nvm i fixed. i followed the help file correctly... 

question how to add margin/padding to label? 

 

Local $output1=GUICtrlCreateLabel('label1', 150, 100, 130, 40)
GUICtrlSetColor($output1,0xFFFFFF)
GUICtrlSetBkColor($output1,0x3C4D66)

 

http://imgur.com/a/zsNJC

Share this post


Link to post
Share on other sites

#8 ·  Posted

sonata,

Sorry for the confusion, but your first explanation was not that clear.

As to your new question, overlay the label to which you are writing on a larger one - but do not forget to disable it.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#9 ·  Posted

Could use an edit and append the actions instead of just updating the label. Will give you the history of everything that's happened (per your screen shot)

Global $edtEdit = GUICtrlCreateEdit("", 10, 10, 380, 280)

; ...
; ...
; ...
; ...
; Mouse click happens
GUICtrlSetData($edtEdit, GUICtrlRead($edtEdit) & "Mouse clicked" & @CRLF)

 

1 person likes this

Share this post


Link to post
Share on other sites

#10 ·  Posted

33 minutes ago, InunoTaishou said:

Could use an edit and append the actions instead of just updating the label. Will give you the history of everything that's happened (per your screen shot)

Global $edtEdit = GUICtrlCreateEdit("", 10, 10, 380, 280)

; ...
; ...
; ...
; ...
; Mouse click happens
GUICtrlSetData($edtEdit, GUICtrlRead($edtEdit) & "Mouse clicked" & @CRLF)

 

thank so much.. thats what i really exactly want to do..

Share this post


Link to post
Share on other sites

#11 ·  Posted

another question how can i bring down the carret scroll down to the last view? vertically 


 

Global $output1 = GUICtrlCreateEdit("", 110, 80, 220, 70)



 GUICtrlSetData($output1, GUICtrlRead($output1) & " YOU PRESSED F5 <" & $iHour & ":" & @MIN & ":" & @SEC & $sAMPM & ">" & @CRLF)

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Check out _GUICtrlEdit_Scroll

Share this post


Link to post
Share on other sites

#13 ·  Posted

thats perfect! ....however my system slows down bcoz of fast update is there way to put delay to GUICtrlSetData without affecting my whole script?

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