forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


New type of Launcher

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Thu Jun 10, 2010 10:52 am    Post subject: New type of Launcher Reply with quote

Hi guys,

I writed this little launcher
Code:

Option DecimalSep,.

%%Menu =

List Create,1
LIst LoadFile,1,@Windir()\Dati.txt
%l = @Next(1)
While @Ok()
  Option FieldSep,@Tab()
  Parse "%m;%i;%p",%l
  %%Menu = %%Menu%m|
  %l = @Next(1)
Wend
%%Menu = %%Menu-|Configurazione
DIALOG CREATE,Pop,0,115,66,BALLOONTIPS,INVISIBLE,NOTITLE,XPMENUS
DIALOG SHOW
:Parti
Dialog PopUp,%%Menu
:Loop
Wait Event,0.1
%%Evento = @Event()
If @Not(@Zero(@Pos(MENU,%%Evento)))
  %c = @Substr(%%Evento,1,@Pred(@Pos(MENU,%%Evento)))
  If @Equal(%c,Configurazione)
    Goto Configurazione
  Else
    List Seek,1,0
    %x = @Match(1,%c)
    If %x
      Parse "%%Voce;%%Com;%%Param",@Item(1)
      Shell Open,%%Com,%%Param,@Path(%%Comm)
    End
  End
Else
  Goto Loop
End
Goto Loop

:VociMenu
  DIALOG CREATE,Gestione Voci Menu,-1,0,486,258,ONTOP
  DIALOG ADD,STYLE,STYLE1,Verdana,,B,,
  DIALOG ADD,TABLE,TABLE1,0,-1,106,242,Voci[100]|.[1]|.[1],,STYLE1
  DIALOG ADD,TEXT,TEXT1,45,113,111,13,Descrizione Voce,,STYLE1
  DIALOG ADD,TEXT,TEXT2,89,114,60,13,Comando,,STYLE1
  DIALOG ADD,TEXT,TEXT3,125,116,65,13,Parametri,,STYLE1
  DIALOG ADD,BUTTON,Salva,224,246,64,24,Salva
  DIALOG ADD,BUTTON,Annulla,224,319,64,24,Annulla
  DIALOG ADD,BUTTON,Cerca,101,447,21,19,...,,STYLE1
  DIALOG ADD,BUTTON,NuovaVoce,7,118,83,24,Nuova Voce
  DIALOG ADD,BUTTON,EliminaVoce,7,207,83,24,Elimina Voce
  DIALOG ADD,BUTTON,Inserisci,175,325,51,24,Inserisci
  DIALOG ADD,BUTTON,Azzera,174,396,51,24,Azzera
  DIALOG ADD,EDIT,Descrizione,61,111,216,19,
  DIALOG ADD,EDIT,Comando,102,113,331,19,
  DIALOG ADD,EDIT,Parametri,141,116,307,19,
  DIALOG SHOW
  List Assign,Table1,1
  :Loop1
  Wait Event
  %%Evento = @Event()
  If @Equal(%%Evento,AnnullaButton)@Equal(%%Evento,Close)
    Stop
  ElsIf @Equal(%%Evento,SalvaBUTTON)
    List SaveFile,Table1,@WinDir()\Dati.txt
  ElsIf @Equal(%%Evento,CercaBUTTON)
    %f = @FileDlg("Tutti i file|*.*",Seleziona File)
    If %f
      Dialog Set,Comando,%f
      Dialog set,Descrizione,@Name(%f)
      Goto Loop1 
    End
  ElsIf @Equal(%%Evento,InserisciBUTTON)
    List Add,Table1,@DlgText(Descrizione)@Tab()@DlgText(Comando)@Tab()@DlgText(Parametri)
    Goto Loop1
  ElsIf @Equal(%%Evento,AzzeraBUTTON)
    Dialog Set,Descrizione,
    Dialog Set,Comando,
    Dialog Set,Parametri,
  ElsIf @Equal(%%Evento,NuovaVoceBUTTON)
    Dialog Set,Descrizione,
    Dialog Set,Comando,
    Dialog Set,Parametri,
    Goto Loop1
  ElsIf @Equal(%%Evento,EliminaVoceBUTTON)
    If @Item(Table1)
      If @Ask(Confermi eliminazione voce?)
        List Delete,Table1
      End
    End 
    Goto Loop1
  Else
    Goto Loop1 
  End
  Exit

 
:Configurazione

Gosub VociMenu
List LoadFile,1,@WinDir()\Dati.txt

Goto Parti


Simply always executed show a popup menu with all application's name to launch
Writes the data file with all items into windows folder, my question is: it's possible to write this datafile into executable without using external data file?

Thanks in advance for any info

Byez
Back to top
View user's profile Send private message Send e-mail
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Sun Jul 04, 2010 8:53 pm    Post subject: Reply with quote

If I was charged with the task I would probably compile the vds executable and the ascii file (along with the VDS runtime) into a SFX EXE file.

I'd extract to a temp directory, then upon close update the resource in the SFX EXE using zip commands (from vdszip.dll I think).
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group