Jump to content

Recommended Posts

  • Moderators
Posted

SirDarknight1200,

Welcome to the AutoIt forum. :)

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at this excellent tutorial - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading. I know you want to start coding NOW, but a little study will save you a lot of trouble later on, believe me. ;)

Good luck - and you know where we are if you run into problems. But do please search the Help file first - it has most of the answers in there somewhere! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

What Melba23 said, plus, if you have trouble coding, then most volunteers/regulars here are only too happy to help, if you provide what you have coded so far.

We help those, who help themselves. Call that our motto or mantra if you like, as it is often a pre-requisite to getting any help ... that and diligently searching both Help file and Forum.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Posted

You might want to look in Melba's signature as well for the GUIExtender UDF, though prior knowledge of AutoIt is required.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

Here something you can start with:

#include <GuiRichEdit.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Opt("GUIResizeMode", 0)
$hGUI = GUICreate("Test", 440, 306)
$Icon1 = GUICtrlCreateIcon("shell32.dll", -98, 14, 12, 32, 32)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
$Label1 = GUICtrlCreateLabel("Windows has recovered from an unexpected shutdown", 64, 20, 314, 17)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton(ChrW(9650), 14, 89, 22, 20)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 9.5, 400, 0, "MS Sans Serif", 4)
$Label2 = GUICtrlCreateLabel("Windows can check online for a solution to the problem.", 64, 48, 269, 17)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 8, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("Hide problem details", 40, 92, 129, 17)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
$Button2 = GUICtrlCreateButton("Check for solution", 223, 89, 120, 25)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
$Button3 = GUICtrlCreateButton("Cancel", 353, 89, 75, 25)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
$Label4 = GUICtrlCreateLabel("Label4", 0, 130, 446, 2, $SS_ETCHEDHORZ)
GUICtrlSetResizing (-1, $GUI_DOCKALL)
$hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 16, 144, 409, 153)
_GUICtrlRichEdit_AppendText($hRichEdit, "{\rtf1\utf8\cf1 {\fs18 {\b Problem signature:}\b0}\cf0 \line}")
_GUICtrlRichEdit_InsertText($hRichEdit, " Problem event name:" & @TAB & @TAB & @TAB & "Bluescreen" & @CRLF)
_GUICtrlRichEdit_InsertText($hRichEdit, " OS version:" & @TAB & @TAB & @TAB & @TAB & "6.1.71600.2.0.0.2256.1" & @CRLF)
_GUICtrlRichEdit_InsertText($hRichEdit, " Locale ID:" & @TAB & @TAB & @TAB & @TAB & "1033")
GUISetState(@SW_SHOW)
$bDir = 1

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $aPos = WinGetPos($hGUI)
            If $bDir = 1 Then
                WinMove($hGUI, "", $aPos[0], $aPos[1], 446, 155)
                $bDir *= -1
                GUICtrlSetData($Button1, ChrW(9660))
                GUICtrlSetData($Label3, "Show problem details")
            Else
                WinMove($hGUI, "", $aPos[0], $aPos[1], 446, 306)
                $bDir *= -1
                GUICtrlSetData($Button1, ChrW(9650))
                GUICtrlSetData($Label3, "Hide problem details")
            EndIf
    EndSwitch
WEnd
Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted (edited)

Sorry, but what I want to know is how to make the form read-only and make the buttons workable. Check for Solution will go to a  website and Cancel will close the gui

Edited by SirDarknight1200
Posted
  On 6/23/2013 at 5:50 AM, SirDarknight1200 said:

How to add a scroll bar?(Vertically)

$hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 16, 144, 409, 153, BitOR($ES_MULTILINE, $ES_READONLY, $WS_VSCROLL))

Posted

Sorry but it doesn't work 

>"H:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Tonmoy\GUI_err.au3"    
C:\Tonmoy\GUI_err.au3 (27) : ==> Variable used without being declared.:
$hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 16, 144, 409, 153, BitOR($ES_MULTILINE, $ES_READONLY, $WS_VSCROLL))
$hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 16, 144, 409, 153, BitOR($ES_MULTILINE, $ES_READONLY, ^ ERROR
>Exit code: 1    Time: 0.333

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
  • Recently Browsing   0 members

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