SetText does not work with Windows 10. ReplaceSell with windows 7.
Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
I'm using this class for years and it's still great.
I need to split rtf code into two parts. Due to specific rtf structure this would be difficult (any idea is welcome), therefore I thought this class could help.
The idea is to open rtf code in the editor (hidden), find specific position at which the file would split (specific unique string, for example #BREAK#), delete the part after the position and save with GetRTF() function. Then I would do the same for the other part by removing the part before the position and get rtf again.
Are there any functions which would help with this? Finding the string position, deleting a part before or after the position? Thanks!
I need to split rtf code into two parts. Due to specific rtf structure this would be difficult (any idea is welcome), therefore I thought this class could help.
The idea is to open rtf code in the editor (hidden), find specific position at which the file would split (specific unique string, for example #BREAK#), delete the part after the position and save with GetRTF() function. Then I would do the same for the other part by removing the part before the position and get rtf again.
Are there any functions which would help with this? Finding the string position, deleting a part before or after the position? Thanks!
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Looks great for my use where I need to open a table to edit. My question is, how do I run "RichEdit_sample.ahk" so it inserts a specific file from the beginning?
Lets say I have another gui with a button. When I click the button I want "RichEdit_sample.ahk" to run and "C:\Users\user\Desktop\RichEdit\Test.rtf" to be inserted. I can´t figure out how to insert a specific file without using the menu
Lets say I have another gui with a button. When I click the button I want "RichEdit_sample.ahk" to run and "C:\Users\user\Desktop\RichEdit\Test.rtf" to be inserted. I can´t figure out how to insert a specific file without using the menu
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
@fuglen,
try to change the script as follows (not tested):
try to change the script as follows (not tested):
Code: Select all
; The rest
Gui, Add, Statusbar
SB_SetParts(10, 200)
GuiW := GuiH := 0
File := "C:\Users\user\Desktop\RichEdit\Test.rtf" ; <<<
If FileExist(File) { ; <<<
RE2.LoadFile(File, "Open") ; <<<
RE2.SetModified() ; <<<
Open_File := File ; <<<
} ; <<<
Gui Show, , % GuiTitle . (Open_File ? " - " . Open_File : "") ; <<<
OnMessage(WM_MOUSEMOVE := 0x200, "ShowSBHelp")
GuiControl, Focus, % RE2.HWND
GoSub, UpdateGui
Return
; ======================================================================================================================
; End of auto-execute section
; ======================================================================================================================
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
@just me
Works like a charm. Thank you!
Works like a charm. Thank you!