James Posted February 1, 2008 Author Posted February 1, 2008 You probably have Richtext installed some other way. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ToyleY Posted February 2, 2008 Posted February 2, 2008 (edited) I can't get it to work from the source code - I get this:==> Can not redeclare a constant.: Global Const $ILC_MASK = 0x0001 I have searched in the include files and found that $ILC_MASK exists in:A3LImageList.au3GuiImageList.au3ImageListConstants.au3I don't have the skill to fix it - has anybody got BetaPad v. 3.0 source code working using Autoit v3.2.10.0?It seems an excellent rich text editor.Ta Edit - looks like some global variables need to be commented out in ModernMenu.au3 (this is a part of BetaPad) because the variables are now declared in Autoit v3.2.10.0 standard includes.And, some function names have changed in GuiStatusBar.au3.I sort of have it working, but a spurious input box appears in the top right-hand corner. If I can fix it I'll post the modifications, but I'm not really sure what I'm doing. Edited February 2, 2008 by ToyleY
James Posted February 2, 2008 Author Posted February 2, 2008 Yeah, that input is a function, which I made, WinBar. You can comment out the function in the While Loop Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
grham Posted February 2, 2008 Posted February 2, 2008 (edited) ToyleY: "I don't have Microsoft office installed - how come the rich text stuff works?" ToyleY, could you look please (only if you want to and have time ....) and try to find out which of your applications could have installed "rich edit"? I would then try to find out the "minimum" files that are needed to get BetaPad to work? (comparing it with what ms office installs) thanks (if not, doesn't matter) greetings! Edited February 2, 2008 by grham
ToyleY Posted February 2, 2008 Posted February 2, 2008 (edited) grham - I installed Open Office (but I had MS Office on my comp before that and uninstalled it).I don't know what the absolute minimum is to be able to use rich text formatting - I would like to know as well, and also if rtf is copyrighted etc.EDIT - found out something"Rich Text Controls are implemented by a DLL file in the Windows System32 folder. The filename varies depending on the version used." riched32.dll (version 1) = Windows 95riched20.dll (version 2) = Windows 98riched20.dll (version 3) = Windows ME / 2000 / XPmsftedit.dll (version 4.1) = Windows XP SP1 / SP2 (latest version)richtx32.ocx - activeX stuff ?(I'm not sure about Vista but the Web says:- )msftedit.dll (version 4.1) = Windows Vista (msftedit.dll release 5.41.21.2507)On my Comp I have: (but some of it might be redundant trash [hello mum])riched32.dll (version 1) = Windows 95 (only 4k but it's a wrapper Dll for Richedit 1.0)riched20.dll (version 3) = Windows ME / 2000 / XP (424k)msftedit.dll (version 4.1) = Windows XP SP1 / SP2 (latest version) (540k)richtx32.ocx (version 6.1.97.82) - activeX stuff ? (208k) Edited February 2, 2008 by ToyleY
James Posted February 2, 2008 Author Posted February 2, 2008 Thanks for the find. Unfortnatley RazerM and I have stopped working on it as we just couldn't get it to install richtext. You can take over, in fact anyone can Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ToyleY Posted February 3, 2008 Posted February 3, 2008 (edited) ... we just couldn't get it to install richtext ...I notice in the prog it has the line:$GUIActiveX = GUICtrlCreateObj($DocEd1, 10, 70)Which means (I think) it uses richtx32.ocx (ActiveX control) to do all the parsing etc.Anyway, I used RegSvr32.exe /n richtx32.ocx in a batch file to deregister richtx32.ocx, and BetaPad fell over (no rtf control). Then I registered it again and BetaPad worked.I'll have to do a clean install of Windows on an old HD or a memory card to play around with installing and registering these rtf control files -riched32.dll (version 1) riched20.dll (version 3) msftedit.dll (version 4.1) richtx32.ocx (version 6.1.97.82)(I think all of them are needed for Windows XP and maybe Vista) and see if it works out Edited February 3, 2008 by ToyleY
James Posted February 3, 2008 Author Posted February 3, 2008 Sure! It didn't work on Vista when I tried it at my friends. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
NELyon Posted February 3, 2008 Posted February 3, 2008 Lol, your original post still says by "Secure_ICT" Might want to update that. Might cause confusion to the newer members
James Posted February 3, 2008 Author Posted February 3, 2008 Yeah will do. Thanks for noticing that! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ToyleY Posted February 5, 2008 Posted February 5, 2008 (edited) Did a bit of work on it -1. status bar now shows on start up2. dumped the search3. dumped speech4. got rid of line artefact when opening file (that brings up scroll bar)5. re-enabled drag and drop6. got printing working OK - just used this (the MS viewer):$printProg = "C:\Program Files\Microsoft Office\OFFICE11\WORDVIEW.EXE " ; printing prog and path $printFile = "test.rtf" ; name of file to print $WorkingDir = "C:\Documents and Settings\User\My Documents" ; directory where file to print resides $CommandLine = $printProg & $printFile ; make the command line run($CommandLine, $WorkingDir, @SW_MAXIMIZE) ; run the print program $PrintWinName = $printFile & " - Microsoft Word Viewer" ; build the print window name WinWaitActive($PrintWinName) ; wait till print program is active Send("!f") ; send 'Alt+f' to print program to bring up print prog menu sleep(10) ; allow for slowness Send("p") ; send 'p' to print program to bring up print dialogue7. Enabled EM_AUTOURLDETECT so hyper-links are properly under-lined / colour change, cursor changes to hand etc. (this needs some work in main loop to make hyper-link do stuff [open mail] web page etc. - looking for EN_LINK I think and then shell to default browser).Global Const $EM_AUTOURLDETECT = ($WM_USER + 91).._SendMessage($rt_handle, $EM_AUTOURLDETECT, True, 0)I'll fiddle about with it a bit to get picture handling working, and then post the code. Edited February 5, 2008 by ToyleY
James Posted February 5, 2008 Author Posted February 5, 2008 Sounds nice! Very glad to see someone still likes this! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ptrex Posted August 6, 2008 Posted August 6, 2008 @all For those who wanted to print the TEXT and PICTURES too. expandcollapse popup#include <GUIConstantsEx.au3> ; Initialize error handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") Global $DocEd1 = ObjCreate("RICHTEXT.RichTextCtrl") $textortf=ObjCreate("richtext.richtextctrl") $commdlg1=ObjCreate("mscomdlg.commondialog") If Not IsObj ($textortf) And Not IsObj($commdlg1) then Exit $hfile = FileOpenDialog("Open RTF File ...","", "Images (*.Rtf)", 1) If $hfile = "" Then Exit $textortf.loadfile($hfile,0) $cdlPDReturnDC=256 $cdlPDNoPageNums=8 $cdlPDSelection=1 $cdlPDAllPages=0 With $textortf .selstart=1 .sellength= Number(stringlen(.textrtf)) EndWith ConsoleWrite($textoRTF.SelLength & @CRLF) $CommDlg1.Flags = $cdlPDReturnDC + $cdlPDNoPageNums if $textoRTF.SelLength = 0 then $CommDlg1.Flags = $CommDlg1.Flags + $cdlPDAllPages Else $CommDlg1.Flags = $CommDlg1.Flags + $cdlPDSelection EndIf If $CommDlg1.hdc < 0 Then Exit $CommDlg1.ShowPrinter $textortf.SelPrint($CommDlg1.hdc) ;------------------------------ This is a COM Error handler -------------------------------- Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"COM Error Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) SetError(1) ; to check for after this function returns Endfunc Enjoy !! regards, ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Zisly Posted September 15, 2008 Posted September 15, 2008 Got scrollbar working.How did you get them working?
James Posted September 15, 2008 Author Posted September 15, 2008 How did you get them working?It is a property control. Gar said something about it. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
drego Posted February 22, 2014 Posted February 22, 2014 I can't get betapad to compile: autoitBetaPadBetaPad.au3 (78) : ==> Variable used without being declared.: $BetaPad = GUICreate("", 735, 600, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MAXIMIZEBOX)) $BetaPad = GUICreate("", 735, 600, -1, -1, BitOR(^ ERROR >Exit code: 1 Time: 0.467
Moderators Melba23 Posted February 22, 2014 Moderators Posted February 22, 2014 drego,As the code dates from 6 years ago there are probably many things which prevent it from compiling with new versions of AutoIt. In this case I think it will be missing #include files - around that time the original huge files were split into many smaller ones to keep the code reasonably sized. I suggest you work through the errors and add the missing files. The function here is GUICreate - look at possible parameters in the Help file and follow the link to "GUI Control Styles Appendix". There you will see that you need the WindowsConstants.au3 include file to get the $GUI_SS_DEFAULT_GUI constant. Do the same sort of thing for each error that is signalled and you will finally get the script to compile - and learn a lot about AutoIt while doing it. M23 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: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now