Jump to content

Search the Community

Showing results for tags 'Rich'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 5 results

  1. Hello, i would like to know why isnt anything displayed on the combo box. i used this example and added it to my code Autoit Example : #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> Dim $sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" GUICreate("Test", 400, 100) $cCombo_Font = GUICtrlCreateCombo("", 10, 10, 170, 20, 2097474);HELPHERE GUICtrlSetData($cCombo_Font, _RegEnumVal($sRegKey)) $cLabel = GUICtrlCreateLabel("Font preview", 230, 10, 155, 20) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $cCombo_Font GUICtrlSetFont($cLabel, 10, Default, Default, GUICtrlRead($cCombo_Font)) EndSwitch WEnd Func _RegEnumVal($sKey) Local $i = 1, $sVal, $sResult While 1 $sVal = RegEnumVal($sKey, $i) If @error Then ExitLoop $i += 1 $sResult &= $sVal & "|" WEnd Return StringRegExpReplace($sResult, " \(.*?\)", "") EndFunc ;==>_RegEnumVal And my code: #NoTrayIcon #include <Misc.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> #include <GuiEdit.au3> #include <String.au3> #include <GuiRichEdit.au3> #include <GuiToolbar.au3> #include <GuiImageList.au3> $WIDTH = 500 $HEIGHT = 380 $EXT1 = "|Rich Text File (*.rtf)" $EXT2 = "|ODF Text (*.odt)" $EXT3 = "|All Files(*.*)" $EXT = $EXT1 & $EXT2 $SETTINGS = "Settings.ini" Dim $FONTKEY = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" Global $FILESAVE, $FILEOPEN = "", $SAVES, $SAVE, $FILEOPENED = 0 Global Enum $e_idNew = 1000, $e_idOpen, $e_idSave, $e_idHelp $MAINGUI = GUICreate("Text Editor", $WIDTH, $HEIGHT, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE) $TOOLBAR = _GUICtrlToolbar_Create($MAINGUI) _GUIImageList_AddIcon($TOOLBAR, @SystemDir & "\shell.dll", -1) $IMAGES = _GUIImageList_Create(24,24) _GUICtrlToolbar_SetImageList($TOOLBAR, $IMAGES) _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, -1);AndHereIfYouCouldTHX _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, -2) _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, 3) _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, 4) _GUICtrlToolbar_AddButtonSep($TOOLBAR) _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, 5) _GUICtrlToolbar_AddButton($TOOLBAR, $e_idNew, 6) $EDITBOX = _GUICtrlRichEdit_Create($MAINGUI, "This is a test.", 10, 35, $WIDTH - 20, $HEIGHT - 70, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) $FONTCOMBOBOX = GUICtrlCreateCombo("", $WIDTH - 170, 10, 160, 20, 2097474);HELPMEHERE GUICtrlSetData($FONTCOMBOBOX, _RegEnumVal($FONTKEY));ALSOHERE $FONTSIZECOMBOBOX = GUICtrlCreateCombo("", $WIDTH - 200, 10, 20, 20, 2097474);FuncForPreviousLineAtTheEnd $FILE = GUICtrlCreateMenu("File") $NEW = GUICtrlCreateMenuItem("New", $FILE) $OPEN = GUICtrlCreateMenuItem("Open...", $FILE) $SAVE = GUICtrlCreateMenuItem("Save", $FILE) $SAVEAS = GUICtrlCreateMenuItem("Save As...", $FILE) $PRINT = GUICtrlCreateMenuItem("Print...", $FILE) GUICtrlCreateMenuItem("", $FILE) $EXIT = GUICtrlCreateMenuItem("Exit", $FILE) $EDIT = GUICtrlCreateMenu("Edit") $UNDO = GUICtrlCreateMenuItem("Undo", $EDIT) $REDO = GUICtrlCreateMenuItem("Redo", $EDIT) $SEPARATOR = GUICtrlCreateMenuItem("", $EDIT) $FONT = GUICtrlCreateMenuItem("Font test", $EDIT) $SEPARATOR1 = GUICtrlCreateMenuItem("", $EDIT) $CUT = GUICtrlCreateMenuItem("Cut", $EDIT) $COPY = GUICtrlCreateMenuItem("Copy", $EDIT) $PASTE = GUICtrlCreateMenuItem("Paste", $EDIT) GUISetState(@SW_SHOW & $GUI_ACCEPTFILES) While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE If _GUICtrlEdit_CanUndo($EDITBOX) Then $SAVECHANGES = MsgBox(35, "Text Editor", "Your original file has been modified." & @CRLF & "Would you like to save changes to it?") If $SAVECHANGES = 6 And $FILEOPENED = 0 Then SaveAs() _GUICtrlRichEdit_Destroy($hRichEdit) Exit EndIf If $SAVECHANGES = 6 And $FILEOPENED = 1 Then FileDelete($FILEOPEN) FileWrite($FILEOPEN, GUICtrlRead($EDITBOX)) Exit EndIf If $SAVECHANGES = 7 Then ExitLoop Exit EndIf EndIf If Not _GUICtrlEdit_CanUndo($EDITBOX) Then Exit Case $Msg = $OPEN $FILEOPEN = FileOpenDialog("Open", $FILEOPEN, $EXT) $TEXT = _GUICtrlRichEdit_StreamFromFile($EDITBOX, $FILEOPEN) _GUICtrlRichEdit_ReplaceText($EDITBOX, $TEXT) $FILEOPENED = 1 Case $Msg = $NEW If _GUICtrlEdit_CanUndo($EDITBOX) Then $SAVECHANGES = MsgBox(35, "Text Editor", "Your original file has been modified." & @CRLF & "Would you like to save changes to it?") If $SAVECHANGES = 6 And $FILEOPENED = 0 Then SaveAs() EndIf If $SAVECHANGES = 6 And $FILEOPENED = 1 Then FileDelete($FILEOPEN) FileWrite($FILEOPEN, GUICtrlRead($EDITBOX)) EndIf If $SAVECHANGES = 7 Then GUICtrlSetData($EDITBOX, "") If $SAVECHANGES = 2 Then Sleep(1) EndIf If Not _GUICtrlEdit_CanUndo($EDITBOX) Then GUICtrlSetData($EDITBOX, "") $FILEOPENED = 0 Case $Msg = $EXIT If _GUICtrlEdit_CanUndo($EDITBOX) Then $SAVECHANGES = MsgBox(35, "Text Editor", "Your original file has been modified." & @CRLF & "Would you like to save changes to it?") If $SAVECHANGES = 6 And $FILEOPENED = 0 Then SaveAs() _GUICtrlRichEdit_Destroy($hRichEdit) Exit EndIf If $SAVECHANGES = 6 And $FILEOPENED = 1 Then FileDelete($FILEOPEN) FileWrite($FILEOPEN, GUICtrlRead($EDITBOX)) Exit EndIf If $SAVECHANGES = 7 Then ExitLoop If $SAVECHANGES = 2 Then Sleep(1) EndIf EndIf If Not _GUICtrlEdit_CanUndo($EDITBOX) Then Exit Case $Msg = $SAVEAS GUICtrlSetState($EDITBOX, $GUI_DISABLE) SaveAs() $FILEOPENED = 1 GUICtrlSetState($EDITBOX, $GUI_ENABLE) Case $Msg = $SAVE And $FILEOPENED = 1 FileDelete($FILEOPEN) FileWrite($FILEOPEN, GUICtrlRead($EDITBOX)) _GUICtrlEdit_EmptyUndoBuffer($EDITBOX) Case $Msg = $SAVE And $FILEOPENED = 0 GUICtrlSetState($EDITBOX, $GUI_DISABLE) SaveAs() $FILEOPENED = 1 GUICtrlSetState($EDITBOX, $GUI_ENABLE) Case $Msg = $SAVE And $FILEOPENED = 0 GUICtrlSetState($EDITBOX, $GUI_DISABLE) SaveAs() $FILEOPENED = 1 GUICtrlSetState($EDITBOX, $GUI_ENABLE) Case $Msg = $PRINT $PRINTMSGBOX = MsgBox(35, "Text Editor", "Are you sure you want to print this page?") Select Case $PRINTMSGBOX = 6 If FileExists("Print.txt") Then FileDelete("Print.txt") EndIf FileWrite("Print.txt", GUICtrlRead($EDITBOX)) $PRINTFILE = "Print.txt" _FilePrint($PRINTFILE) FileDelete($PRINTFILE) EndSelect Case $Msg = $UNDO _GUICtrlRichEdit_Undo($EDITBOX) Case $Msg = $REDO _GUICtrlRichEdit_Redo($EDITBOX) Case _GUICtrlEdit_CanUndo($EDITBOX) And $SAVES = 1 GUICtrlSetState($SAVE, $GUI_ENABLE) Case $Msg = $CUT _GUICtrlRichEdit_Cut ($EDITBOX) Case $Msg = $COPY _GUICtrlRichEdit_Copy ($EDITBOX) Case $Msg = $PASTE _GUICtrlRichEdit_Paste ($EDITBOX) Case Not _GUICtrlEdit_CanUndo($EDITBOX) And $SAVES = 0 GUICtrlSetState($SAVE, $GUI_DISABLE) $SAVES = 1 Case $Msg = $FONT _GUICtrlRichEdit_SetFont($EDITBOX, $FONTSIZECOMBOBOX, "Times New Roman") Case $FONTCOMBOBOX _GUICtrlRichEdit_SetFont($EDITBOX, $FONTSIZECOMBOBOX, GUICtrlRead($FONTCOMBOBOX)) EndSelect WEnd Exit Func SaveAs() $FILESAVEAS = FileSaveDialog("Save As", "", "Text Document (*.txt)|All Files (*.*)") If Not @error Then $STRING = StringSplit($FILESAVEAS, ".") If $STRING[0] = 1 Then FileDelete($FILESAVEAS) _GUICtrlRichEdit_StreamToFile($EDITBOX, $FILESAVEAS &".rtf") Else _GUICtrlRichEdit_StreamToFile($EDITBOX, $FILESAVEAS &".rtf") EndIf EndIf EndFunc Func _RegEnumVal($sKey) Local $i = 1, $sVal, $sResult While 1 $sVal = RegEnumVal($sKey, $i) If @error Then ExitLoop $i += 1 $sResult &= $sVal & "|" WEnd Return StringRegExpReplace($sResult, " \(.*?\)", "") EndFunc ;==>_RegEnumVal So the problem is that The second combo box is blank Icons in taskbar are not appearing (don't really care for now, .dll file for icon in attachement) problem with $FONTCOMBOBOX = GUICtrlCreateCombo("", 10, 10, 200, 20, Bitor($CBS_SORT,$CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_VSCROLL) (BitOR gave me a weird error) Thanks ! Autoit newbie ico.dll
  2. Hey ya'll! Quick question: Is it possible to make text in a _GUICtrlRichEdit_Create:ed control strikethrough, much like you can do with the GUICtrlSetFont:s Attribute-parameter? It has to able to do so with selected text and not with everything in the control. Thanks in advance, zvvyt
  3. Hey ya'll. I'm making a something like the Windows 7-app Sticky-note consisting of unspecified numbers of "note"-GUIs with RichEdits in them. The problem I'm facing is that for the RichEdit to work it requires the hWnd of its GUI (which can be solved by just having a variable that's getting replaced as new "notes" are being made), but the next problem is to read the handle/ID of the RichEdit for further functions. This is what it looks like atm: #cs Unlimited, controlable windows #ce Opt("GUIOnEventMode", 1) Opt("TrayMenuMode", 1 + 2) Opt("TrayOnEventMode",1) #include <array.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <TrayConstants.au3> #include <GuiRichEdit.au3> TrayCreateItem("LAN-notes") TrayItemSetState(-1, $TRAY_DISABLE) TrayCreateItem("") TrayCreateItem("New") TrayItemSetOnEvent(-1, "New") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"TrayExit") TraySetState(1) $hWnd = GUICreate("",0,0) GUISetState(@SW_HIDE,-1) Call("New") while 1 Sleep(10) #cs $GUI_CurrentSize = WinGetPos($hGui) If $GUI_CurrentSize[2] <> $GUI_PrevSize[0] Or $GUI_CurrentSize[3] <> $GUI_PrevSize[1] Then _WinAPI_MoveWindow($Edit1,0,20,$GUI_CurrentSize[2]-20,$GUI_CurrentSize[3]-60) $GUI_PrevSize[0] = $GUI_CurrentSize[2] $GUI_PrevSize[1] = $GUI_CurrentSize[3] EndIf #ce WEnd Func New() $p = GUICreate("LAN-notes - ",200,200,Default,Default,BitOR($ws_sizebox,$WS_MINIMIZEBOX),Default,$hWnd) $winlist = WinList("LAN-notes") GUISetOnEvent($GUI_EVENT_CLOSE, "MainEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "MainEvents") GUICtrlCreateButton("+",0,0,20,20) GUICtrlSetFont(-1,12) GUICtrlSetOnEvent(-1,"New") GUICtrlCreateButton("Save",22,0,35,20) GUICtrlSetOnEvent(-1,"Save") ;GUICtrlCreateButton("Test", 50,80) ; GUICtrlSetOnEvent(-1,"Test") GUICtrlCreateInput("",60,0,105,20) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlCreateButton("Edit",165,0,35,20) GUICtrlSetOnEvent(-1,"EditProjName") _GUICtrlRichEdit_Create($p, "",0,25,180,160, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_WANTRETURN,$ES_MULTILINE)) GUISetState() EndFunc Func Test() $winlist = WinList("LAN-notes") _ArrayDisplay($winlist) EndFunc Func MainEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE If WinExists("LAN-notes") Then If MsgBox(4,"Exit?","You sure you want to close this note?") = 6 Then GUIDelete(@GUI_WinHandle) EndIf EndSelect EndFunc Func EditProjName() ConsoleWrite("Edit projName" & @CRLF) If GUICtrlGetState(@GUI_CtrlId-1) = 144 Then GUICtrlSetState(@GUI_CtrlId-1,$GUI_ENABLE) GUICtrlSetData(@GUI_CtrlId,"Done") Else WinSetTitle(@GUI_WinHandle,"","LAN-notes - " & GUICtrlRead(@GUI_CtrlId-1)) GUICtrlSetState(@GUI_CtrlId-1,$GUI_DISABLE) GUICtrlSetData(@GUI_CtrlId,"Edit") EndIf EndFunc Func Save() ConsoleWrite("--> Save" & @CRLF) ConsoleWrite(_GUICtrlRichEdit_GetText(@GUI_CtrlId+4) & @CRLF) EndFunc Func TrayExit() ConsoleWrite("TrayExit") Exit EndFunc Thanks, zvvyt
  4. Rich-Edit Predict Text UDF Working It sub classes the rich-edit control and matches the current word through the Database & sets selection in accordance. For Edit Controls look Functions Predicts Text from an User-Defined Database.Sets the Predicted Text when Enter is pressed.Pressing Backspace deletes the previously typed character.Support Editing, Overwriting, Updating, Deleting the Database.Has the Feature to add New words the user types in the control, to the Database.Supports Sensitive and In-Sensitive Prediction.Currently Supports Auto-completion only.Rich Edit Controls only supportedFuture Updates​Support Auto-suggestion.Note That if you set a Password Char for the Edit Box the Prediction will automatically get Unregistered.This UDF requires Beta Release 3.3.9.4++ [beta-Oct-2012] Index ; #CURRENT# ===================================================================================================================== ;_RegisterPrediction ;_UpdatePredictList ;_UnRegisterPrediction ;_RegisterListingSpaceWords ;_RegisterListingNewWords ;_GetSelectedText ;_GetListCount ;_GetCurrentWord ;_GetCaretOffset ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ;_New_WndProc ; AddToArray ; MakeArray ;_RichEdit_SubClass ;_AutoExit ;_PredictText ;_PredictSpaceText ;_SetSelection ;_MatchString ;_CtrlSetStyle ;_CtrlGetStyle ;_RemoveBit ; =============================================================================================================================== Please Notify for any other Updates and Bugs. Change-log v1.0 - First Release v1.1 - Fixed a bug. RichEditPredictText [uDF] v1.1 v1.1 RichEditPredictText UDF.7z Previous Downloads : 80 Regards Phoenix XL
  5. I would like to have a clickable text(hyperlink) in a RichEdit control besides a URL. To be more specific, I would like to display "Download" instead. How can I achieve this functionality? I have searched with no luck. Thanks for any help. Related Information: From GUIRichEdit.au3: Func _GUICtrlRichEdit_SetEventMask($hWnd, $iEventMask) If Not _WinAPI_IsClassName($hWnd, $_GRE_sRTFClassName) Then Return SetError(101, 0, False) If Not __GCR_IsNumeric($iEventMask) Then Return SetError(102, 0, False) _SendMessage($hWnd, $EM_SETEVENTMASK, 0, $iEventMask) Return True EndFunc ;==&gt;_GUICtrlRichEdit_SetEventMask$iEventMask = $ENM_LINK - Sends $EN_LINK notifications when the mouse pointer is over text having the link character. What is the link character "http://"? The following would work but is not a perfect solution "http://Download". From RichEditConstants.au3 used in _GUICtrlRichEdit_AutoDetectURL($hWnd, $fState) Global Const $__RICHEDITCONSTANT_WM_USER = 0x400 Global Const $EM_AUTOURLDETECT = $__RICHEDITCONSTANT_WM_USER + 91 RichEdit Friendly Name Hyperlinks on MSDN $EN_LINK - http://msdn.microsoft.com/en-us/library/windows/desktop/bb787970%28v=vs.85%29.aspx GUIRegisterMsg($WM_COMMAND, "WM_NOTIFY") WM_NOTIFY is the function called when a link is clicked. Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $h_RichEdit Select Case $iCode = $EN_LINK Local $ENLINK = DllStructCreate($tagENLINK,$ilParam) Local $Link_Msg = DllStructGetData($ENLINK,4) If $Link_Msg = $WM_LBUTTONUP Then Local $Link = _GUICtrlRichEdit_GetTextRange($hWndFrom,DllStructGetData($ENLINK,7),DllStructGetData($ENLINK,8)) MsgBox(0, '', $Link) EndIf Case $iCode = $EN_MSGFILTER Local $tMsgFilter = DllStructCreate($tagEN_MSGFILTER, $ilParam) If DllStructGetData($tMsgFilter, 4) = $WM_RBUTTONUP Then ; WM_RBUTTONUP Local $hMenu = GUICtrlGetHandle($RichMENU[0]) _SetMenuTexts($hWndFrom, $RichMENU) _GUICtrlMenu_TrackPopupMenu($hMenu, $hWnd) EndIf EndSelect EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY I am doing more research but from what I can tell this all done using DLLs therfore no easy solution that I will be able to conjure up. Suggested Methods: ITextRange2::SetURL method ITextRange2::GetURL method I have no idea how to use these. Resolved see last post.
×
×
  • Create New...