Yannick
Nombre de messages : 8635 Age : 53 Localisation : Bretagne Date d'inscription : 15/02/2010
| Sujet: Extract Sub to Macros Mar 2 Sep 2014 - 3:09 | |
| Voici un petit utilitaire que je me suis fait pour extraire mes subs d' une librairie et les transformer en fichier *.macro pour l' éditeur de Klaus. Attention, la sub est prise depuis "Sub" jusqu'à "End_sub" si il y a un commentaire entre deux subs il n' est pas pris en compte. voilà le code : - Spoiler:
- Code:
-
Variables() Labels() Gui() Init() End
Sub Variables() dim dir$,Path$ dir$=dir_current$ Path$=dir_current$+"\Macros" dim Clic%,Change% dim no%,MM%,SM%(5),Frame1%,Frame2% dim M_file%,L_files% dim B_Rename%,B_Supprime%,B_Export% dim SB%,PB% dim DL_file% dim num%,index% dim F_Mes%,B_Synedit% dim SynediMac$ dim ChgFile% End_sub Sub Labels() Label Clic,Change,erreur,N End_sub
Clic: Clic%=Number_click if clic%=SM%(2) :Open() : end_if if clic%=SM%(3) :Terminate : end_if if clic%=L_files% :View() : end_if if clic%=B_rename% :Rename() : end_if if clic%=B_Supprime% :Supprime() : end_if if clic%=B_Synedit% :DefineSEM(): end_if if clic%=B_Export% :Export() : end_if return
Change: Change%=number_change if change%=M_File% ChgFile% =1 end_if return Sub Gui() O_Form(0,0,1,0,0,500,800,"Extract Sub to Macro") font_name 0,"arial" no%=no%+1 : MM%=no% O_Main_menu(no%,0) no%=no%+1 : SM%(1)=no% O_Sub_Menu(no%,MM%,"Fichier",1,1) no%=no%+1 : SM%(2)=no% O_Sub_Menu(no%,SM%(1),"Ouvrir",1,1) no%=no%+1 : SM%(3)=no% O_Sub_Menu(no%,SM%(1),"Quitter",1,1)
no%=no%+1 : Frame1%=no% O_Panel(no%,0,1,0,0,height(0)-78,250) no%=no%+1 : Frame2%=no% O_Panel(no%,0,1,0,width(Frame1%),height(0)-78,width(0)-266) no%=no%+1 : L_files%=no% O_List(no%,Frame1%,1,5,5,height(frame1%)-40,width(frame1%)-10,"",1) cursor_point no% no%=no%+1 : B_Rename%=no% O_Button(no%,frame1%,1,height(L_files%)+10,5,0,50,"Rename",1) hint no%,"Permet de renommer le fichier *.Macro sélectionné" no%=no%+1 : B_Supprime%=no% O_Button(no%,frame1%,1,height(L_files%)+10,55,0,50,"Delete",1) hint no%,"Supprime le fichier *.macro sélectionné"
no%=no%+1 : B_Export%=no% O_Button(no%,frame1%,1,height(L_files%)+10,105,0,50,"Export",1) hint no%,"Exporte le fichier *.macro sélectionné vers le dossier Synedit_Editor_Macros"
no%=no%+1 : M_file%=no% O_Memo(no%,Frame2%,1,5,5,height(frame2%)-10,width(frame2%)-10,"") bar_both no% On_change no%,Change no%=no%+1 : SB%=no% O_Statut_Bar(no%,0,1) no%=no%+1 : PB%=no% O_Progress_Bar(no%,0,0,height(0)-78,width(0)-236,0,200)
no%=no%+1 : DL_file%=no% O_DList(no%,"") End_sub ' ****************************************************************************** ' BIBLIOTHEQUE OBJETS ' ******************************************************************************
Sub O_Form(No%,P%,V%,T%,L%,H%,W%,C$) if No%> 0 then FORM No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 : Top No%,T% : Else : Top No%,(Screen_y-H%)/2 : End_If If L% > 0 : Left No%,L%: Else : Left No%,(Screen_x-W%)/2: End_If if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Alpha(No%,P%,V%,T%,L%,H%,W%,C$) ALPHA No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Edit(No%,P%,V%,T%,L%,H%,W%,T$,Ch%) EDIT No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% If T$<>"" Then Text No%,T$ If Ch%=1 Then On_Change No%,Change End_Sub ' ______________________________________________________________________________ Sub O_Button(No%,P%,V%,T%,L%,H%,W%,C$,Cl%) BUTTON No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ if Cl%> 0 then on_click No%,Clic cursor_point No% End_Sub ' ______________________________________________________________________________ Sub O_Container(No%,P%,V%,T%,L%,H%,W%,C$) CONTAINER No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Memo(No%,P%,V%,T%,L%,H%,W%,F$) MEMO No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if F$<>"" if file_exists(F$)=1 then file_load No%,F$ end_if End_Sub ' ______________________________________________________________________________ Sub O_Combo(No%,P%,V%,T%,L%,H%,W%,F$,Cl%) COMBO No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if F$<>"" if file_exists F$ then file_load No%,F$ end_if if Cl%> 0 then on_click No%,Clic End_Sub ' ______________________________________________________________________________ Sub O_List(No%,P%,V%,T%,L%,H%,W%,F$,Cl%) LIST No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if F$<>"" if file_exists F$ then file_load No%,F$ end_if if Cl%> 0 then on_click No%,Clic End_Sub ' ______________________________________________________________________________ Sub O_Picture(No%,P%,V%,T%,L%,H%,W%,P$) PICTURE No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if P$<>"" then File_load No%,P$ End_Sub ' ______________________________________________________________________________ Sub O_Check(No%,P%,V%,T%,L%,H%,W%,C$) CHECK No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Option(No%,P%,V%,T%,L%,H%,W%,C$) OPTION No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Main_Menu(No%,P%) MAIN_MENU No% if P% > 0 then Parent No%,P% End_Sub ' ______________________________________________________________________________ Sub O_Sub_Menu(No%,P%,C$,Cl%,A%) SUB_MENU No% if P% > 0 then Parent No%,P% if C$<>"" then Caption No%,C$ If Cl%=1 : on_click No%,Clic : end_if If Cl%=2 : on_click No%,Clic2 : end_if If Cl%=3 : on_click No%,Clic3 : end_if If Cl%=4 : on_click No%,Clic4 : end_if If A%=0 then inactive No% End_Sub ' ______________________________________________________________________________ Sub O_Open_Dialog(No%,Out%,DD$,Filtre$,O%) dim_local F$ If Object_Exists(No%)=0 OPEN_DIALOG No% End_if if DD$<>"" then Dir_Dialog No%,DD$ if filtre$<>"" then Filter No%,Filtre$+"|"+Filtre$ F$=File_name$(No%) if variable("File$")=0:Dim File$:End_If if F$<>"_" if O%=1 then text out%,F$ if O%=2 then Caption Out%,F$ if O%=3 then item_add Out%,F$ if O%=4 then file_load Out%,F$ if O%=5 then File$=F$ end_if Delete No% End_Sub ' ______________________________________________________________________________ Sub O_Save_Dialog(No%,NOut%,DD$,Filtre$,ext$) dim_local F$,i%,ext% If Object_Exists(No%)=0 SAVE_DIALOG No% End_If If DD$<>"" then Dir_Dialog No%,DD$ If filtre$<>"" then Filter No%,Filtre$ F$=file_name$(No%) If F$<>"_" for i%=1 to len(F$) if mid$(f$,i%,1)=".":ext%=1:exit_for:end_if next i% if ext%=1 File_Save NOut%,F$ else File_save NOut%,F$+ext$ end_if End_If Delete No% End_Sub ' ______________________________________________________________________________ Sub O_Progress_Bar(No%,P%,V%,T%,L%,H%,W%) PROGRESS_BAR No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% End_Sub ' ______________________________________________________________________________ Sub O_Dlist(No%,F$) dim_local Fic$ Fic$=F$ DLIST No% if F$<>"" if file_exists(Fic$)=1 : then file_load No%,Fic$ : end_if end_if End_Sub ' ______________________________________________________________________________ Sub O_Container_Option(No%,P%,V%,T%,L%,H%,W%,C$) CONTAINER_OPTION No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% if C$<>"" then Caption No%,C$ End_Sub ' ______________________________________________________________________________ Sub O_Statut_Bar(No%,P%,V%,M%) Dim_Local No2% ,x% ,a% ,Pa%,OSB2% Pa%=P% :No2%=No% for x%=1 to Number_Objects:If Object_Type(x%)=13 :a%=1:End_If:Next x% If M%=0 O_Picture(No2%,P%,V%,Height(P%)-61,0,23,width(P%)-16,"") Else if M%=1 O_Picture(No2%,P%,V%,Height(P%)-81,0,23,width(P%)-16,"") else O_Picture(No2%,P%,V%,height(P%)-81,0,23,width(P%)-16,"") end_if End_If OSB2%=No2% Adaptation_OSB(No2%,Pa%) End_Sub ' ______________________________________________________________________________ Sub O_Button_Picture(num_obj%,No_b%,P%,V1%,V2%,T%,L%,H%,W%,Pict$,Pict2$) O_Picture(num_obj%+1,P%,V2%,T%,L%,H%,W%,Pict2$):cursor_point num_obj% +1 O_Picture(num_obj%,P%,V1%,T%,L%,H%,W%,Pict$):On_click num_obj%,Clic:cursor_point num_obj% obj% = obj%+1 if variable("No2%")=0 : dim No2% :No2%=7000 :End_if if Variable("R%")=0 :dim R% :R%=1:else :R%=R%+1 :end_if if Object_exists(7000)=0 :O_Edit(7000,P%,0,-190,-200,0,0):End_If If Variable("KGF_res%")=0 then dim KGF_res% KGF_res% = dll_call2("ClickSetHook",handle(P%),handle(No2%)) KGF_res% = dll_call5("ClickDefineRect",R%,L%,T%,W%,H%)
No2%=No_b% O_Button(No2%,P%,0,-200,-200,0,0,"",1) KGF_res% = dll_call3("ClickSetLinkRect",handle(No2%),0-5,R%)
No2%=No_b%+1 O_Button(No2%,P%,0,-200,-200,0,0,"",1) KGF_res% = dll_call3("ClickSetLinkRect",handle(No2%),0-6,R%) End_Sub ' ______________________________________________________________________________ Sub Adaptation_OSB(No%,P%) Dim_Local x% ,y% ,z% ,t$ ,R_osb% ,G_osb% ,B_osb% color No%,235,235,239 : y%=width(P%)-27 Restore while t$<>"OSB_Corps.bmp" :read t$:End_while Read R_osb% :Read G_osb% :Read B_osb% 2d_target_is No% : 2d_pen_color R_osb%,G_osb%,B_osb% for x%=0 to y% :2d_point x%,z% :next x% Restore while t$<>"OSB_Fin.bmp" :read t$:End_while for x%=y% to y%+10 for z%=0 to 22 Read R_osb% :Read G_osb% :Read B_osb% 2d_target_is No% : 2d_pen_color R_osb%,G_osb%,B_osb% 2d_point x%,z% next z% next x% Data "OSB_Corps.bmp" data 170,165,162 data "OSB_Fin.bmp" data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 170,165,162 data 242,239,239 data 170,165,162 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 242,239,239 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 242,239,239 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 242,239,239 data 170,165,162 data 170,165,162 data 242,239,239 data 170,165,162 data 170,165,162 data 242,239,239 data 170,165,162 data 170,165,162 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 170,165,162 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 data 239,235,235 End_Sub ' ------------------------------------------------------------------------------ Sub O_Timer(No%,OO%,Inter%) TIMER No% if OO%=1 then timer_on No% if OO%=0 then timer_off No% if inter%>0 then timer_interval No%,inter% End_Sub ' ------------------------------------------------------------------------------ Sub O_Spin(No%,P%,V%,T%,L%,H%,W%,Mi%,Ma%,C%) SPIN No% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% Min No%,Mi% Max No%,Ma% if C% > 0 Then on_change No%,Change End_sub ' ------------------------------------------------------------------------------ Sub O_Panel(No%,P%,V%,T%,L%,H%,W%) Panel no% if P% > 0 then Parent No%,P% If V% = 0 Then hide No% If H% > 0 Then Height No%,H% If W% > 0 Then Width No%,W% If T% > 0 Then Top No%,T% If L% > 0 Then Left No%,L% End_sub Sub Init() dim_local x%,a$,b$ if dir_exists(path$)=0 then dir_make Path$ dir_change Path$ a$=file_find_first$ a$=file_find_next$ while a$<>"_" if file_extract_extension$(a$)=".macro" x%=x%+1 b$=file_extract_name$(a$) b$=left$(a$,len(a$)-6) item_add L_files%,b$ end_if a$=file_find_next$ end_while file_find_close num%=x% If file_exists(dir$+"\ESTM.ini")=0 Mes() else file_load DL_file%,dir$+"\ESTM.ini" SynediMac$=item_read$(DL_file%,1) clear DL_File% end_if End_sub
Sub Open() dim_local x%,y%,a$,b$,deb%,fin%,num$ Clear DL_file% clear M_file% no%=no%+1 O_Open_dialog(no%,0,":\","*.bas|*.bas",5) if file$<>"" file_load DL_file%,file$ min PB%,0 : max PB%,count(DL_file%) : position PB%,0 : show PB% for x%=1 to count(DL_file%) a$=item_read$(DL_file%,x%) a$=trim$(a$) if upper$(left$(a$,3))="SUB" deb%=x% else if upper$(left$(a$,7))="END_SUB" fin%=x% end_if end_if if fin%>0 N: num%=num%+1 if num%<10 : num$="0"+str$(num%):else:num$=str$(num%):end_if if file_exists(Path$+"\Macro("+num$+").macro")=1 goto N end_if no%=no%+1 file_open_write no%,Path$+"\Macro("+num$+").macro" item_add L_files%,"Macro("+num$+")" for y%=deb% to fin% b$=item_read$(DL_file%,y%) file_writeln no%,b$ next y% file_close no% no%=no%-1 deb%=0 fin%=0 end_if position PB%,position(PB%)+1 display next x% end_if file$="" sort L_files% position PB%,0 hide PB% End_sub
Sub View() dim_local i%,c%,x%,a$ clear M_file% file_load M_file%,Path$+"\"+item_index$(L_files%)+".macro" index%=item_index(L_files%) DefineModif(1) if ChgFile%=1 : ChgFile%=0 : end_if End_sub
Sub Rename() dim_local f$,a$ if index%<>0 DefineModif(2) if chgt%=1 if Message_warning_yes_no( "Le fichier a été modifié"+chr$(13)+"Voulez vous enregistrer les modifications avant de le renommer ?...")=1 file_save M_file%,item_index$(L_files%) end_if end_if f$=Path$+"\"+item_read$(L_files%,index%)+".macro" erreur: if message_input("Rename","Nouveau nom :","")=1 if message_text$<>"" file_rename f$,Path$+"\"+message_text$+".macro" item_delete L_files%,index% item_insert L_files%,index%,message_text$ Clear M_file% else message "Vous devez indiquer un nom !!!..." goto erreur end_if end_if end_if End_sub
Sub Supprime() dim_local f$,a$ if index%<>0 f$=Path$+"\"+item_read$(L_files%,index%)+".macro" file_delete f$ item_delete L_files%,index% index%=0 clear M_file% end_if End_sub
Sub DefineModif(app%) dim_local x%,a$,c% for x%=1 to count(M_File%) a$=item_read$(M_file%,x%) c%=c%+len(a$) next x% if variable("Ncar_in%")=0 then dim Ncar_in% if variable("Ncar_out%")=0 then dim Ncar_out% if variable("Chgt%")=0 then dim Chgt% if app%=1 Ncar_in%=c% Ncar_out%=0 chgt%=0 else Ncar_out%=c% if Ncar_in%<>Ncar_out% or ChgFile%=1 Chgt%=1 end_if end_if End_sub
Sub Export() dim_local f1$,f2$ if item_index(L_files%)>0 DefineModif(2) if chgt%=1 if Message_warning_yes_no( "Le fichier a été modifié"+chr$(13)+"Voulez vous enregistrer les modifications avant de l' exporter ?...")=1 file_save M_file%,item_index$(L_files%) end_if end_if f1$=Path$+"\"+item_index$(L_files%)+".macro" f2$=SynediMac$+item_index$(L_files%)+".macro" if file_exists(f2$)=0 file_rename f1$,f2$ item_delete L_files%,index% index%=0 clear M_file% else Message "Fichier existant,"+chr$(13)+"Vous devez le renommer !..." exit_sub end_if else Message "Sélectionnez une Macro !..." exit_sub end_if ENd_sub
Sub Mes() no%=no%+1 : F_Mes%=no% O_Form(no%,0,1,0,0,170,330,"Chemin Synedit") font_name no%,"arial" no%=no%+1 O_Alpha(no%,F_Mes%,1,10,10,0,0,"Bienvenue dans Extract Sub to Macro") font_size no%,12 : font_bold no% no%=no%+1 O_Alpha(no%,F_Mes%,1,50,10,0,0,"Veuillez indiquer le chemin du dossier :"+chr$(13)+ "Synedit_Editor_Macros") no%=no%+1 : B_Synedit%=no% O_Button(no%,F_Mes%,1,90,(width(F_Mes%)-66)/2,0,50,".../...",1) End_sub
Sub DefineSEM() hide F_Mes% no%=no%+1 O_Open_dialog(no%,0,"c:\","*.macro|*.macro",5) if file$<>"" SynediMac$=file_extract_path$(file$) file$="" no%=no%+1 file_open_write no%,dir$+"\ESTM.ini" file_writeln no%,SynediMac$ file_close no% no%=no%-1 end_if if SynediMac$="" :inactive B_Synedit% : end_if End_sub
Dernière édition par ygeronimi le Jeu 4 Sep 2014 - 13:54, édité 3 fois (Raison : MAJ + correction d' un tout petit bug) | |
|