Jump to content

Export all file au3 to html


anib
 Share

Recommended Posts

hi everybody ,

i'm to search command , testing cmd scite -open:(file) -exportashtml:(dest)

but open software scite , i'm search an automation not visible (hide scite ?) or not util scite ?

#include <IE.au3>

#include <File.au3>

#include <GUIConstants.au3>

dim $msgbox = "", $msgboxexport = ""

$sauver = @scriptdir

$folder = FileSelectFolder("","c:\","all (*.au3)")

$folderlu = _FileListToArray($folder,"*.au3")

if stringinstr($folder,"\") Then

$folder = StringReplace($folder,"\","\\")

EndIf

$folder = $folder & "\\"

For $x = 1 To UBound($folderlu) - 1

$msgbox = $msgbox & "[" & $x & "]" & "=" & $folder & $folderlu[$x] & @CRLF

run(@ComSpec & ' /c start scite "-open:'&$folder & $folderlu[$x] & '" "-exportashtml:' & $folderlu[$x] & ".html")

Next

ConsoleWrite($msgbox)

thanx

Edited by anib

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Link to comment
Share on other sites

  • Developers

this is an example that will use SciTE's Director interface to export script Test.au3 to Test.au3.html.

You need to make sure SciTE is running but it can be hidden...

Opt("WinSearchChildren", 1)
Global $WM_COPYDATA = 74
; Get SciTE DirectorHandle 
$Scite_hwnd = WinGetHandle("DirectorExtension")
$ScriptFile = "Test.au3"
SendSciTE_Command(0, $SciTE_hwnd, 'open:' & StringReplace($ScriptFile, "\", "\\") & '')
SendSciTE_Command(0, $SciTE_hwnd, 'exportashtml:' & StringReplace($ScriptFile, "\", "\\") & '.htm')
SendSciTE_Command(0, $SciTE_hwnd, 'close:')
;
; Send command to SciTE
Func SendSciTE_Command($My_Hwnd, $Scite_hwnd, $sCmd) 
    ConsoleWrite('-->' & $sCmd & @lf )
    Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']')
    DllStructSetData($CmdStruct, 1, $sCmd)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr')
    DllStructSetData($COPYDATA, 1, 1)
    DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1)
    DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct))
    DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_hwnd, _
            'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _
            'Ptr', DllStructGetPtr($COPYDATA))
EndFunc;==>SendSciTE_Command
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

thank jdeb

excellent :)

func send_scite is very good

is not call dll(scillexdll) just Gui scite ?

encore merci

It uses the Hidden SciTE Director Window and standard Windows Messages to communicate... No DLL calls :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

is very educative example thanks, now help for WM & structure :-)

i'm verry happy :)

thanks for example and cmdline close:

now i'm two example possible :)

export all file :P

but i'm not search correcly this forum (func sendscite_command) scitedll.au3 a lot script

excuse me for post :P

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Link to comment
Share on other sites

  • Developers

Thanks JDeB! Very educative example.

here is one that does 2-way communication between SciTE and the Script...

Bit more complex but it gives an Idea of what could be done when you think about it ... :)

#include<guiconstants.au3>
Opt("WinSearchChildren", 1)
Global $WM_COPYDATA = 74
Global $SciTECmd
; Get SciTE DirectorHandle
$Scite_hwnd = WinGetHandle("DirectorExtension")
; Get My GUI Handle numeric
Global $My_Hwnd = GUICreate("SciTE interface", 400, 600, 10, 10, Default, $WS_EX_TOPMOST)
$list = GUICtrlCreateEdit("", 1, 1, 390, 590)
$My_Dec_Hwnd = Dec(StringTrimLeft($My_Hwnd, 2))
;Register COPYDATA message.
GUIRegisterMsg($WM_COPYDATA, "MY_WM_COPYDATA")
GUISetState()
SendSciTE_Command($My_Hwnd, $SciTE_hwnd,"open:C:\\Program Files\\AutoIt3\\Examples\\Calculator.au3")
SendSciTE_Command($My_Hwnd, $Scite_hwnd, "askproperty:autoit3dir")
SendSciTE_Command($My_Hwnd, $Scite_hwnd, "askproperty:CurrentWord")
SendSciTE_Command($My_Hwnd, $Scite_hwnd, "askproperty:CurrentSelection")
SendSciTE_Command($My_Hwnd, $Scite_hwnd, "askproperty:SciteDefaultHome")
SendSciTE_Command($My_Hwnd, $Scite_hwnd, "askfilename:")
; Runs command.09   which is tidy but this only works properly due to SciTE JObQueue issues.
;SendSciTE_Command($My_Hwnd, $Scite_hwnd, "menucommand:1109")
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
Exit
;
;
; Send command to SciTE
Func SendSciTE_Command($My_Hwnd, $Scite_hwnd, $sCmd)
    $sCmd = ":" & $My_Dec_Hwnd & ":" & $sCmd
    ConsoleWrite('-->' & $sCmd & @LF)
    GUICtrlSetData($list, GUICtrlRead($list) & '-->' & $sCmd & @CRLF)
    Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']')
    DllStructSetData($CmdStruct, 1, $sCmd)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr')
    DllStructSetData($COPYDATA, 1, 1)
    DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1)
    DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct))
    DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_hwnd, _
            'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _
            'Ptr', DllStructGetPtr($COPYDATA))
EndFunc  ;==>SendSciTE_Command
;
;
; Received Data from SciTE
Func MY_WM_COPYDATA($hWnd, $msg, $wParam, $lParam)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr', $lParam)
    $SciTECmdLen = DllStructGetData($COPYDATA, 2)
    Local $CmdStruct = DllStructCreate('Char[255]', DllStructGetData($COPYDATA, 3))
    $SciTECmd = StringLeft(DllStructGetData($CmdStruct, 1), $SciTECmdLen)
    ConsoleWrite('<--' & $SciTECmd & @LF)
    GUICtrlSetData($list,GUICtrlRead($list) & '<--' & $SciTECmd & @CRLF )
EndFunc  ;==>MY_WM_COPYDATA

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 3 weeks later...

hello everybody, excuse me, is it possible to add a permanent button on scite, without using external file (like a ini)?

its possible or not ? i'm to search but don't find :)

thx a lot

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Link to comment
Share on other sites

  • Developers

hello everybody, excuse me, is it possible to add a permanent button on scite, without using external file (like a ini)?

its possible or not ? i'm to search but don't find :)

thx a lot

When you mean an Button on the toolbar then its not possible, but what is it you want to do ?

You can add your own Tools with a shortkey to SciTE easily.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

thx :)

is correctly ?

command.35.$(file.patterns.au3)="$(autoit3dir)\autoit3.exe" /ErrorStdOut "$(SciteDefaultHome)\html.au3" $(1) $(2) $(3) $(4)

menucommand:111 save html, and export html is not exist ?

thank a lot and excuse me for question ;)

Edited by anib

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Link to comment
Share on other sites

excuse me, i'm in the documentation of scite (it speaks about lua and for learning, I started)

I have download lua.exe (version 5.1) and I configured it ( file 'lua.properties'

command.go.*.lua=$(SciteDefaultHome)\api\lua\lua5.1.exe "$(FileNameExt)"

if I pressed on f5 nothing happen,

question :) how do I proceed please? thanks

Edited by anib

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

Link to comment
Share on other sites

  • Developers

excuse me in the documentation of scite it's speaks about lua to learn I launch out, I have download lua.exe (version 5.1) and I is configur there the file 'lua.properties'

command.go.*.lua=$(SciteDefaultHome)\api\lua\lua5.1.exe "$(FileNameExt)"

if I pressed on f5 nothing does not do, how do I have to proceed please? thx

Not sure what you want to do here, but LUA is already integrated in SciTE.

To start a script from SciTE you compile it and add something like this in SciTEUSer.Properties:

command.38.*.au3="path-to-your-script\yourscript.exe" "$(FilePath)" 
command.name.38.*.au3=Convert2Html
command.save.before.38.*.au3=1
command.shortcut.38.*.au3=Ctrl+Shoft+C

And in your script you read the input file from the commandline and process it.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I've well read that it was integrated into scite but It don't start a script *.lua

AutoIt3.Lua.txt & AutoIt3.Lua & line au3.properties is # Standard LUA Functions extension.$(file.patterns.au3)=$(SciteDefaultHome)\AutoIt3.lua

i'm testing only *.au3 ;)

SciTEUSer.Properties , is empty (no caractère)

command.38.*. < is strong number if debute number 1 = command.1.*. is correctly ? i'm testing number command 1 but i don't see a change.

is it possible to create a menu(htmlconvert) and submenu (htmlconvert'file') & htmlconvert'allfile' ?

i return to my helpfile .

I hope to attain your level as soon as possible :)

Edited by anib

Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR

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...