Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=disrupted] actually you can do lots of things with km macro language.. it's more advanced than you think and supports injecting jscript which makes it possible to convert some of ff extensions.. the problem is, that some(or many) js in ff extensions are coded to call certain services for ff which are not available in kmeleon..the trick is, recode the js functions to work properly in kmeleon which is not an easy task for a non-js dev. i'm not good at js, that's why i prefer writing equivalents with autotit because it's a language i can code in without having to pull my hair out. i installed your addon in firefox and actually it's not very hard but again detested javascript..the main idea is; it creates a file(similar to what i did in autoit) and then waits for that file to be saved(this i did not do) so i took the concept and implemented it using autoit without the need for the js code.. i think it works pretty much the same as in ff now. the context menu for selected text has been removed, you can only launch directly from text field without the need to select anything and select archivedit command [img]http://kmeleon.holaservers.com/disrupted/archie0.jpg[/img] the text will be copied to a text file and opened in notepad2 now renamed to kmaredit.exe, the section(field) where the text edited will be copied to will change background colour to yellow so user kmows where the edited text will go [img]http://kmeleon.holaservers.com/disrupted/archie1.jpg[/img] to ensure the user doesn't close kmeleon or do anything to mess up the procedure like switching tabs (foolproof), the kmeleon window gets disabled temporarily while kmaredit.exe is running, a popup notification will show at the bottom of the screen during edit mode notfying the user that km will be enabled when kmaredit is closed.. also for windows 2k and above, the km window will be set to a slight transparency so user knows it's disabled when transparent. [img]http://kmeleon.holaservers.com/disrupted/archie2.jpg[/img] edit the text and close kmaredit or save and close.. in the end kmaredit must be closed so autoit knows it's time to paste the edited text. [img]http://kmeleon.holaservers.com/disrupted/archie3.jpg[/img] e voila [img]http://kmeleon.holaservers.com/disrupted/archie4.jpg[/img] download from same link [url=http://kmext.sourceforge.net/files/archivedit.7z]http://kmext.sourceforge.net/files/archivedit.7z[/url] the drawback compared to the previous script is you can nlonger use your editor of choice and must only kmareditor.. don't rename the editor and put it in archivedit folder, only use the supplied kmareditor (notepad2) sources: [color=green][sub]# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- edit selected text $_archedit=getfolder(RootFolder)."\\Tools\\archivedit"; $archivedcss=getfolder(RootFolder)."\\Tools\\archivedit\\archivedit.css"; archivfield{ setclipboard(""); injectCSS(readfile($archivedcss)); id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); exec($_archedit."\\archivedit.exe "); } archivedit_BuildMenu{ setmenu("TextPopup",macro,"Archive Edit",archivfield,4); } $OnInit=$OnInit."archivedit_BuildMenu;"; #------------------------------------------- $macroModules=$macroModules."txtarchiveditor;";[/sub][/color] [color=blue][sub]; AutoIt Version: 3.3.0 ; Language: English ; Platform: Win9x/NT ; Author: yanni #NoTrayIcon #include <GUIConstant[color=red]s E x[/color].au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #Include <Clipboard.au3> #Include <File.au3> $w=@DesktopWidth $h=@DesktopHeight $gw=$w - 260 $gh=$h - 60 $textarchive=ClipGet() $pendedit=(@scriptdir & "\pendarch.txt") $txteditor=(@scriptdir & "\kmareditor.exe") _FileCreate(@tempdir & "\pendarch.txt") $defaultpath=(@ScriptDir) FileWriteLine($pendedit, "" ) FileWriteLine($pendedit, $textarchive) sleep(88) $runner=($txteditor & " " & $pendedit) run($runner) WinsetTrans("[CLASS:KMeleon Browser Window]", "", 188); WinsetState("[CLASS:KMeleon Browser Window]", "", @SW_disable); sleep(44) $lockB = GUICreate("Archiveditmode", 280, 24, $gw, $gh, BitOR($WS_DLGFRAME, $WS_POPUP, $WS_EX_TOPMOST)) $Label1 = GUICtrlCreateLabel("Edit Mode: Please Close kmareditor when done. ", 8, 3, 278, 15) WinSetOnTop("Archiveditmode", "", 1) GUISetState(@SW_SHOW) While 1 WinActivate("[CLASS:Scintilla]", "") ProcessWaitClose("kmareditor.exe") writeback() WEnd func writeback() WinsetTrans("[CLASS:KMeleon Browser Window]", "", 255); WinsetState("[CLASS:KMeleon Browser Window]", "", @SW_enable); if proces[color=red]s e x[/color]ists("k-meleon.exe") then BlockInput(1) $shit=FileRead($pendedit) ClipPut($shit) WinActivate("[CLASS:KMeleon Browser Window]", "") send("^a") send("^v") BlockInput(0) sleep(40) FileDelete($pendedit) exit else FileDelete($pendedit) exit endif endfunc exit [/sub][/color][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development