Jump to content

Help: RTF Plugin by Lazycat


Yuraj
 Share

Recommended Posts

Hi,

try this:

$path = "file.doc"
$search = ""
$replace = ""

$Word = ObjCreate("Word.Application")
$Word.Documents.Open($path)
With $Word.Selection.Find
   .ClearFormatting
   .Replacement.ClearFormatting
;~       expression.Execute(FindText, MatchCase, MatchWholeWord, MatchWildcards, &_
;~       MatchSoundsLike, MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace,&_
;~       MatchKashida, MatchDiacritics, MatchAlefHamza, MatchControl)
   .Execute($search, false, false, false, false, false, true, false, false, $replace, 2)
EndWith
$Word.Activedocument.Save()
$Word.Activedocument.Close
$Word.quit

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Ok,in details (If i use the hotkey F1, then replace only word ,,SimpFunc,, to colored - e.g.Green ,,/SimpFunc/,,. Problem is in, that replacing all words...): :lmao:

#include <GuiConstants.au3>
#include "RTF_writer.au3"

$Hot=HotKeySet("{F1}","HotKey")
$hPlug = PluginOpen ("rtfplugin.dll")
$hGUI = GUICreate("RTF plugin test", 600, 340)
$hEdit = GUICtrlCreateRTFEdit($hGUI, 0, 0, 600, 300, -1, 0x20000)
$Msg=ControlCommand ("RTF plugin test", "", "RichEdit20A1", "GetSelected")
GUISetState()
;SynTax

func HotKey()
$Get=GuiCtrlRTFGet($hEdit)
local $out = _RTFCreateDocument("MS Sans Serif")
$Main=ControlGetText("RTF plugin test","","RichEdit20A1")
$T1="/SimpFunc/"
$T="SimpFunc"
$UPD=StringReplace($Main,$T,$T1)
$PD=$UPD
$out0 = _RTFAppendString($out,$PD, 0x00FF00, 12, 1, "MS Sans Serif")
GUICtrlRTFSet($hEdit, $out0, 0)
Sleep(100)
EndFunc

While 1
    $nMsg = GUIGetMsg()

    Switch $nMsg
    
Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd
exit(@error)

ShellExecute("http://www.yuraj.ucoz.com")ProcessClose(@AutoItPID)

Link to comment
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
 Share

  • Recently Browsing   0 members

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