Výsledky 1 až 7 z 7

Téma: [Delphi] Spusteni a otevreni souboru pres asociaci -Vyreseno

  1. #1
    Senior Member
    Založen
    07.10.2002
    Bydliště
    Ostrava / Straznice
    Příspěvky
    1 133
    Vliv
    289

    Standardní [Delphi] Spusteni a otevreni souboru pres asociaci -Vyreseno

    Potrebuju, aby kdyz asociuju priponu se svym programem a spustim soubor s touto priponou aby se mel otevrel v mem programu pres mou Load(...) fci, jak na to?
    Intel C2D 4300, 1GB DDR2, 120GB Seagate, nVidia7600GT pasiv.

  2. #2
    Senior Member mince Avatar uživatele KtK
    Založen
    16.10.2002
    Bydliště
    Behind fuc*ing WorkTable Device (Praha zapad)
    Příspěvky
    1 709
    Vliv
    298

    Standardní

    to ti jde o to zjistit jaky dostal program parametry z shellu? (Ten dotaz je dost nejasnej.) Pokud ano, podivej se po "ParamCount" a "ParamStr" dost mozna si to pamatuju nepresne az blbe, ale tak nejak to snad bylo..
    Parasite lost, AKA the Girlfriend Mission:The Socka Project sleeps, lets use (her :) Durex! 1GHz in some soltek stuff, Ati rage 128, etc.. (it\'s noisy)
    IMB Thinkpad R31: celer 1.2GHz, 384M RAM, 60GB 5400rpm hitachi, i810 8MB onboard (na praci to staci ;)
    [pro archivni ucely] janina overclockerska poradna (.tar.gz, 1.1MB, otevrete si index.html v browseru podporujicim javascript a frames)

  3. #3
    Senior Member
    Založen
    07.10.2002
    Bydliště
    Ostrava / Straznice
    Příspěvky
    1 133
    Vliv
    289

    Standardní

    Popisu to polopaticteji
    Mam treba test.xls, kdyz na neho uzivatel klikne tak se spusti excel a tento soubor otevre, ja potrebuju udelat to same ale u sveho programu.

    Na ten ParamCount a ParamStr se podivam
    Intel C2D 4300, 1GB DDR2, 120GB Seagate, nVidia7600GT pasiv.

  4. #4
    Senior Member mince Avatar uživatele KtK
    Založen
    16.10.2002
    Bydliště
    Behind fuc*ing WorkTable Device (Praha zapad)
    Příspěvky
    1 709
    Vliv
    298

    Standardní

    tak to je presne ono. vsak se zavola nejaky prikaz shellu
    Kód:
    c:/bla bla /msexcel.exe "soubor.xml"
    a ten paramstr a paramcount je neco jako argv[] a argc v C..
    Parasite lost, AKA the Girlfriend Mission:The Socka Project sleeps, lets use (her :) Durex! 1GHz in some soltek stuff, Ati rage 128, etc.. (it\'s noisy)
    IMB Thinkpad R31: celer 1.2GHz, 384M RAM, 60GB 5400rpm hitachi, i810 8MB onboard (na praci to staci ;)
    [pro archivni ucely] janina overclockerska poradna (.tar.gz, 1.1MB, otevrete si index.html v browseru podporujicim javascript a frames)

  5. #5
    Senior Member
    Založen
    07.10.2002
    Bydliště
    Ostrava / Straznice
    Příspěvky
    1 133
    Vliv
    289

    Standardní

    Diky, uz to funguje, ted uz jen dodelat k tomu instalator a jsem hotovy, ma nocni mura, ze to snad nikdy nedodelam se rozplyva
    Intel C2D 4300, 1GB DDR2, 120GB Seagate, nVidia7600GT pasiv.

  6. #6
    Senior Member mince Avatar uživatele KtK
    Založen
    16.10.2002
    Bydliště
    Behind fuc*ing WorkTable Device (Praha zapad)
    Příspěvky
    1 709
    Vliv
    298

    Standardní

    tak sem aspon napis jak je ten kod, ty dve "konstrukce" jsem sem placnul z hlavy a delphi uz jsem nevidel asi rok, takze to asi nebude presne
    Parasite lost, AKA the Girlfriend Mission:The Socka Project sleeps, lets use (her :) Durex! 1GHz in some soltek stuff, Ati rage 128, etc.. (it\'s noisy)
    IMB Thinkpad R31: celer 1.2GHz, 384M RAM, 60GB 5400rpm hitachi, i810 8MB onboard (na praci to staci ;)
    [pro archivni ucely] janina overclockerska poradna (.tar.gz, 1.1MB, otevrete si index.html v browseru podporujicim javascript a frames)

  7. #7
    Senior Member
    Založen
    07.10.2002
    Bydliště
    Ostrava / Straznice
    Příspěvky
    1 133
    Vliv
    289

    Standardní

    Kód:
    Returns a specified parameter from the command-line.
    
    Unit
    
    System
    
    Category
    
    command line utilities
    
    Delphi syntax:
    
    function ParamStr(Index: Integer): string;
    
    C++ syntax:
    
    extern PACKAGE AnsiString __fastcall ParamStr(int Index);
    
    Description
    
    ParamStr returns the parameter from the command line that corresponds to Index, or an empty string if Index is greater than ParamCount. For example, an Index value of 2 returns the second command-line parameter.
    
    On Windows, ParamStr(0) returns the path and file name of the executing program (for example, C:\TEST\MYPROG.EXE).
    	On Linux, ParamStr(0) returns the command used to execute the program, without parameters (for example, ./myprogram). This behavior is dependent on information returned by the shell program and may not be consistent among all shells.
    Note:	Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).
    Z ParamStr(0) zjistuji, v jakem adresari je umisten program, abych vedel kam ukladat nastaveni apod. No a pak pomoci ParamCount
    Kód:
    Returns the number of parameters passed on the command line.
    
    Unit
    
    System
    
    Category
    
    command line utilities
    
    Delphi syntax:
    
    function ParamCount: Integer;
    
    C++ syntax:
    
    extern PACKAGE int __fastcall ParamCount(void);
    
    Description
    
    ParamCount returns the number of parameters passed to the program on the command line. Separate parameters with spaces or tabs. Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).
    zjistuju jestli mam zacit otvirat nejaky soubor, ale lze to zjistovat i pres if (ParamStr(1) <> '') ....
    Intel C2D 4300, 1GB DDR2, 120GB Seagate, nVidia7600GT pasiv.

Informace o tématu

Users Browsing this Thread

Toto téma si právě prohlíží 1 uživatelů. (0 registrovaných a 1 anonymních)

Pravidla přispívání

  • Nemůžete zakládat nová témata
  • Nemůžete zasílat odpovědi
  • Nemůžete přikládat přílohy
  • Nemůžete upravovat své příspěvky
  •