Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

File Type Association

12 posts in General Discussion Last posting was on 2013-03-11 17:11:32.0Z
Ajay Posted on 2013-02-28 19:08:49.0Z
Sender: 407f.512f4b2c.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <512fab41.5cee.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 28 Feb 2013 11:08:49 -0800
X-Trace: forums-1-dub 1362078529 172.20.134.41 (28 Feb 2013 11:08:49 -0800)
X-Original-Trace: 28 Feb 2013 11:08:49 -0800, 172.20.134.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249757
Article PK: 1308014

I am not sure if Powerbuilder is able to do this. Have got a
file with any extension, and my goal is that I should be
able to open up Pb application and bring up any parameters
if I have used them in my calling file.

thanks


Roland Smith [TeamSybase] Posted on 2013-03-01 12:46:09.0Z
From: "Roland Smith [TeamSybase]" <rsmith@trusthss.com>
Newsgroups: sybase.public.powerbuilder.general
References: <512fab41.5cee.1681692777@sybase.com>
Subject: Re: File Type Association
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <5130a311$1@forums-1-dub>
Date: 1 Mar 2013 04:46:09 -0800
X-Trace: forums-1-dub 1362141969 172.20.134.152 (1 Mar 2013 04:46:09 -0800)
X-Original-Trace: 1 Mar 2013 04:46:09 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249762
Article PK: 1308023

Below is the contents of a .reg file that associates .srw files with the
program pbeditor.exe. You can easily adapt this to your own program and file
types.


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.srw]
@="PowerBuilder.srw"

[HKEY_CLASSES_ROOT\.srw\OpenWithList]

[HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
@=""

[HKEY_CLASSES_ROOT\PowerBuilder.srw]
@="PowerBuilder Window"

[HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
@="C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe,0"

[HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]

[HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]

[HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
@="\"C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe\" \"%1\""

<Ajay> wrote in message news:512fab41.5cee.1681692777@sybase.com...
>I am not sure if Powerbuilder is able to do this. Have got a
> file with any extension, and my goal is that I should be
> able to open up Pb application and bring up any parameters
> if I have used them in my calling file.
>
> thanks


Ajay Posted on 2013-03-01 14:40:25.0Z
Sender: 545c.5130a60e.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <5130bdd9.5ec7.1681692777@sybase.com>
References: <5130a311$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 1 Mar 2013 06:40:25 -0800
X-Trace: forums-1-dub 1362148825 172.20.134.41 (1 Mar 2013 06:40:25 -0800)
X-Original-Trace: 1 Mar 2013 06:40:25 -0800, 172.20.134.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249766
Article PK: 1308028

Hi Roland,
I am not sure that I completely follow this.
Do you have any samples that is doing this?

thanks

> Below is the contents of a .reg file that associates .srw
> files with the program pbeditor.exe. You can easily adapt
> this to your own program and file types.
>
>
> Windows Registry Editor Version 5.00
>
> [HKEY_CLASSES_ROOT\.srw]
> @="PowerBuilder.srw"
>
> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
>
> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
> @=""
>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
> @="PowerBuilder Window"
>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
> @="C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe,0"
>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
> @="\"C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe\"
> \"%1\""
>
>
> <Ajay> wrote in message
> news:512fab41.5cee.1681692777@sybase.com... >I am not sure
> > if Powerbuilder is able to do this. Have got a file with
> > any extension, and my goal is that I should be able to
> > open up Pb application and bring up any parameters if I
> have used them in my calling file. >
> > thanks
>
>


Roland Smith [TeamSybase] Posted on 2013-03-01 20:10:36.0Z
From: "Roland Smith [TeamSybase]" <rsmith@trusthss.com>
Newsgroups: sybase.public.powerbuilder.general
References: <5130a311$1@forums-1-dub> <5130bdd9.5ec7.1681692777@sybase.com>
Subject: Re: File Type Association
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <51310b3c$1@forums-1-dub>
Date: 1 Mar 2013 12:10:36 -0800
X-Trace: forums-1-dub 1362168636 172.20.134.152 (1 Mar 2013 12:10:36 -0800)
X-Original-Trace: 1 Mar 2013 12:10:36 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249776
Article PK: 1308041

This is a sample .reg file. Select and paste it into Notepad and save as
fileassoc.reg.

Then change the .srw to what ever your file extension is, change the program
to whatever your program is and change PowerBuilder to the descriptive name
of the file.

<Ajay> wrote in message news:5130bdd9.5ec7.1681692777@sybase.com...
> Hi Roland,
> I am not sure that I completely follow this.
> Do you have any samples that is doing this?
>
> thanks
>> Below is the contents of a .reg file that associates .srw
>> files with the program pbeditor.exe. You can easily adapt
>> this to your own program and file types.
>>
>>
>> Windows Registry Editor Version 5.00
>>
>> [HKEY_CLASSES_ROOT\.srw]
>> @="PowerBuilder.srw"
>>
>> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
>>
>> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
>> @=""
>>
>> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
>> @="PowerBuilder Window"
>>
>> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
>> @="C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe,0"
>>
>> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
>>
>> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
>>
>> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
>> @="\"C:\\Program Files\\TopWiz\\WizSource\\pbeditor.exe\"
>> \"%1\""
>>
>>
>> <Ajay> wrote in message
>> news:512fab41.5cee.1681692777@sybase.com... >I am not sure
>> > if Powerbuilder is able to do this. Have got a file with
>> > any extension, and my goal is that I should be able to
>> > open up Pb application and bring up any parameters if I
>> have used them in my calling file. >
>> > thanks
>>
>>


Ajay Posted on 2013-03-01 21:25:20.0Z
Sender: 545c.5130a60e.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <51311cc0.c84.1681692777@sybase.com>
References: <51310b3c$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 1 Mar 2013 13:25:20 -0800
X-Trace: forums-1-dub 1362173120 172.20.134.41 (1 Mar 2013 13:25:20 -0800)
X-Original-Trace: 1 Mar 2013 13:25:20 -0800, 172.20.134.41
Lines: 62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249778
Article PK: 1308043

Ok, I saved this into a file, and now when I double click it
asks me if I want to add it to the registry file.

What all I want to do is just open PB application from an
another app and pass it some args.

thanks
Ajay

> This is a sample .reg file. Select and paste it into
> Notepad and save as fileassoc.reg.
>
> Then change the .srw to what ever your file extension is,
> change the program to whatever your program is and change
> PowerBuilder to the descriptive name of the file.
>
> <Ajay> wrote in message
> > news:5130bdd9.5ec7.1681692777@sybase.com... Hi Roland,
> > I am not sure that I completely follow this.
> > Do you have any samples that is doing this?
> >
> > thanks
> >> Below is the contents of a .reg file that associates
> srw >> files with the program pbeditor.exe. You can
> easily adapt >> this to your own program and file types.
> >>
> >>
> >> Windows Registry Editor Version 5.00
> >>
> >> [HKEY_CLASSES_ROOT\.srw]
> >> @="PowerBuilder.srw"
> >>
> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
> >>
> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
> >> @=""
> >>
> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
> >> @="PowerBuilder Window"
> >>
> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
> >> @="C:\\Program
> Files\\TopWiz\\WizSource\\pbeditor.exe,0" >>
> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
> >>
> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
> >>
> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
> >> @="\"C:\\Program
> Files\\TopWiz\\WizSource\\pbeditor.exe\" >> \"%1\""
> >>
> >>
> >> <Ajay> wrote in message
> >> news:512fab41.5cee.1681692777@sybase.com... >I am not
> sure >> > if Powerbuilder is able to do this. Have got a
> file with >> > any extension, and my goal is that I should
> be able to >> > open up Pb application and bring up any
> parameters if I >> have used them in my calling file. >
> >> > thanks
> >>
> >>
>
>


Roland Smith [TeamSybase] Posted on 2013-03-04 12:59:21.0Z
From: "Roland Smith [TeamSybase]" <rsmith@trusthss.com>
Newsgroups: sybase.public.powerbuilder.general
References: <51310b3c$1@forums-1-dub> <51311cc0.c84.1681692777@sybase.com>
Subject: Re: File Type Association
Lines: 78
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <51349aa9$1@forums-1-dub>
Date: 4 Mar 2013 04:59:21 -0800
X-Trace: forums-1-dub 1362401961 172.20.134.152 (4 Mar 2013 04:59:21 -0800)
X-Original-Trace: 4 Mar 2013 04:59:21 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249796
Article PK: 1308065

I guess I misunderstood your original question. You mentioned 'called file'
so I thought you needed to create a file association.

Try this:

ls_parms = "some value"

Run("myprogram.exe " + ls_parms)

Then in myprogram.exe, the application object will have "some value" in it's
commandline argument.

<Ajay> wrote in message news:51311cc0.c84.1681692777@sybase.com...
> Ok, I saved this into a file, and now when I double click it
> asks me if I want to add it to the registry file.
>
> What all I want to do is just open PB application from an
> another app and pass it some args.
>
> thanks
> Ajay
>> This is a sample .reg file. Select and paste it into
>> Notepad and save as fileassoc.reg.
>>
>> Then change the .srw to what ever your file extension is,
>> change the program to whatever your program is and change
>> PowerBuilder to the descriptive name of the file.
>>
>> <Ajay> wrote in message
>> > news:5130bdd9.5ec7.1681692777@sybase.com... Hi Roland,
>> > I am not sure that I completely follow this.
>> > Do you have any samples that is doing this?
>> >
>> > thanks
>> >> Below is the contents of a .reg file that associates
>> srw >> files with the program pbeditor.exe. You can
>> easily adapt >> this to your own program and file types.
>> >>
>> >>
>> >> Windows Registry Editor Version 5.00
>> >>
>> >> [HKEY_CLASSES_ROOT\.srw]
>> >> @="PowerBuilder.srw"
>> >>
>> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
>> >>
>> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
>> >> @=""
>> >>
>> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
>> >> @="PowerBuilder Window"
>> >>
>> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
>> >> @="C:\\Program
>> Files\\TopWiz\\WizSource\\pbeditor.exe,0" >>
>> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
>> >>
>> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
>> >>
>> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
>> >> @="\"C:\\Program
>> Files\\TopWiz\\WizSource\\pbeditor.exe\" >> \"%1\""
>> >>
>> >>
>> >> <Ajay> wrote in message
>> >> news:512fab41.5cee.1681692777@sybase.com... >I am not
>> sure >> > if Powerbuilder is able to do this. Have got a
>> file with >> > any extension, and my goal is that I should
>> be able to >> > open up Pb application and bring up any
>> parameters if I >> have used them in my calling file. >
>> >> > thanks
>> >>
>> >>
>>
>>


Ajay Posted on 2013-03-05 13:28:42.0Z
Sender: 1222.5135f1da.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <5135f309.12a4.1681692777@sybase.com>
References: <51349aa9$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 5 Mar 2013 05:28:42 -0800
X-Trace: forums-1-dub 1362490122 172.20.134.41 (5 Mar 2013 05:28:42 -0800)
X-Original-Trace: 5 Mar 2013 05:28:42 -0800, 172.20.134.41
Lines: 92
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249812
Article PK: 1308106

Hi Smith,
Sorry about misleading.
I will explain what I am trying to do:
Say, I have a file k.pita, just an extension, now when I
double click on this file Pb application should open up and
should be able to receive what arguments are there in the
aforementioned file.
One can open a Win Rt application using something like this
and can receive arguments in the opened application. Do you
think it is possible to do with Pb.

thanks

> I guess I misunderstood your original question. You
> mentioned 'called file' so I thought you needed to create
> a file association.
>
> Try this:
>
> ls_parms = "some value"
>
> Run("myprogram.exe " + ls_parms)
>
> Then in myprogram.exe, the application object will have
> "some value" in it's commandline argument.
>
>
> <Ajay> wrote in message
> > news:51311cc0.c84.1681692777@sybase.com... Ok, I saved
> > this into a file, and now when I double click it asks me
> if I want to add it to the registry file. >
> > What all I want to do is just open PB application from
> > an another app and pass it some args.
> >
> > thanks
> > Ajay
> >> This is a sample .reg file. Select and paste it into
> >> Notepad and save as fileassoc.reg.
> >>
> >> Then change the .srw to what ever your file extension
> is, >> change the program to whatever your program is and
> change >> PowerBuilder to the descriptive name of the
> file. >>
> >> <Ajay> wrote in message
> >> > news:5130bdd9.5ec7.1681692777@sybase.com... Hi Roland
> , >> > I am not sure that I completely follow this.
> >> > Do you have any samples that is doing this?
> >> >
> >> > thanks
> >> >> Below is the contents of a .reg file that associates
> >> srw >> files with the program pbeditor.exe. You can
> >> easily adapt >> this to your own program and file
> types. >> >>
> >> >>
> >> >> Windows Registry Editor Version 5.00
> >> >>
> >> >> [HKEY_CLASSES_ROOT\.srw]
> >> >> @="PowerBuilder.srw"
> >> >>
> >> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
> >> >>
> >> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
> >> >> @=""
> >> >>
> >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
> >> >> @="PowerBuilder Window"
> >> >>
> >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
> >> >> @="C:\\Program
> >> Files\\TopWiz\\WizSource\\pbeditor.exe,0" >>
> >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
> >> >>
> >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
> >> >>
> >> >>
> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command] >>
> >> @="\"C:\\Program >>
> Files\\TopWiz\\WizSource\\pbeditor.exe\" >> \"%1\"" >> >>
> >> >>
> >> >> <Ajay> wrote in message
> >> >> news:512fab41.5cee.1681692777@sybase.com... >I am
> not >> sure >> > if Powerbuilder is able to do this. Have
> got a >> file with >> > any extension, and my goal is that
> I should >> be able to >> > open up Pb application and
> bring up any >> parameters if I >> have used them in my
> calling file. > >> >> > thanks
> >> >>
> >> >>
> >>
> >>
>
>


Ajay Posted on 2013-03-08 19:11:16.0Z
Sender: 5114.5139e456.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <513a37d4.7430.1681692777@sybase.com>
References: <5135f309.12a4.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 8 Mar 2013 11:11:16 -0800
X-Trace: forums-1-dub 1362769876 172.20.134.41 (8 Mar 2013 11:11:16 -0800)
X-Original-Trace: 8 Mar 2013 11:11:16 -0800, 172.20.134.41
Lines: 96
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249849
Article PK: 1308228

I think I found the answer eventually. I had to create a
file of any extension and associate it with Pb.exe file.

thanks for all endurance.

> Hi Smith,
> Sorry about misleading.
> I will explain what I am trying to do:
> Say, I have a file k.pita, just an extension, now when I
> double click on this file Pb application should open up
> and should be able to receive what arguments are there in
> the aforementioned file.
> One can open a Win Rt application using something like
> this and can receive arguments in the opened application.
> Do you think it is possible to do with Pb.
>
> thanks
>
> > I guess I misunderstood your original question. You
> > mentioned 'called file' so I thought you needed to
> > create a file association.
> >
> > Try this:
> >
> > ls_parms = "some value"
> >
> > Run("myprogram.exe " + ls_parms)
> >
> > Then in myprogram.exe, the application object will have
> > "some value" in it's commandline argument.
> >
> >
> > <Ajay> wrote in message
> > > news:51311cc0.c84.1681692777@sybase.com... Ok, I saved
> > > this into a file, and now when I double click it asks
> > me if I want to add it to the registry file. >
> > > What all I want to do is just open PB application from
> > > an another app and pass it some args.
> > >
> > > thanks
> > > Ajay
> > >> This is a sample .reg file. Select and paste it into
> > >> Notepad and save as fileassoc.reg.
> > >>
> > >> Then change the .srw to what ever your file extension
> > is, >> change the program to whatever your program is
> > and change >> PowerBuilder to the descriptive name of
> > the file. >>
> > >> <Ajay> wrote in message
> > >> > news:5130bdd9.5ec7.1681692777@sybase.com... Hi
> > Roland , >> > I am not sure that I completely follow
> > this. >> > Do you have any samples that is doing this?
> > >> >
> > >> > thanks
> > >> >> Below is the contents of a .reg file that
> > associates >> srw >> files with the program
> > pbeditor.exe. You can >> easily adapt >> this to your
> > own program and file types. >> >>
> > >> >>
> > >> >> Windows Registry Editor Version 5.00
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\.srw]
> > >> >> @="PowerBuilder.srw"
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList]
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\.srw\OpenWithList\pbeditor.exe]
> > >> >> @=""
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw]
> > >> >> @="PowerBuilder Window"
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\DefaultIcon]
> > >> >> @="C:\\Program
> > >> Files\\TopWiz\\WizSource\\pbeditor.exe,0" >>
> > >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell]
> > >> >>
> > >> >> [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open]
> > >> >>
> > >> >>
> > [HKEY_CLASSES_ROOT\PowerBuilder.srw\shell\open\command]
> > >> >> @="\"C:\\Program >>
> > Files\\TopWiz\\WizSource\\pbeditor.exe\" >> \"%1\"" >>
> > >> >> >>
> > >> >> <Ajay> wrote in message
> > >> >> news:512fab41.5cee.1681692777@sybase.com... >I am
> > not >> sure >> > if Powerbuilder is able to do this.
> > Have got a >> file with >> > any extension, and my goal
> > is that I should >> be able to >> > open up Pb
> > application and bring up any >> parameters if I >> have
> > used them in my calling file. > >> >> > thanks
> > >> >>
> > >> >>
> > >>
> > >>
> >
> >


Roland Smith [TeamSybase] Posted on 2013-03-11 12:47:50.0Z
From: "Roland Smith [TeamSybase]" <rsmith@trusthss.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
References: <5135f309.12a4.1681692777@sybase.com> <513a37d4.7430.1681692777@sybase.com>
In-Reply-To: <513a37d4.7430.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <513dd276$1@forums-1-dub>
Date: 11 Mar 2013 04:47:50 -0800
X-Trace: forums-1-dub 1363006070 172.20.134.152 (11 Mar 2013 04:47:50 -0800)
X-Original-Trace: 11 Mar 2013 04:47:50 -0800, vip152.sybase.com
Lines: 3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249868
Article PK: 1308257

That is what said to do in my initial reply. The registry file I
provided is what happens behind the scenes to the registry when you
associate a file extension from Windows Explorer.


Ajay Posted on 2013-03-11 14:38:11.0Z
Sender: 3ae0.513dc8ba.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <513dec53.45d3.1681692777@sybase.com>
References: <513dd276$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 11 Mar 2013 06:38:11 -0800
X-Trace: forums-1-dub 1363012691 172.20.134.41 (11 Mar 2013 06:38:11 -0800)
X-Original-Trace: 11 Mar 2013 06:38:11 -0800, 172.20.134.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249876
Article PK: 1308265


> That is what said to do in my initial reply. The registry
> file I provided is what happens behind the scenes to the
> registry when you associate a file extension from Windows
> Explorer.

Great to see your response. Now, I am trying to read that
file from the open event of application. But unfortunately
this file opened by Powerbuilder application and am not able
to supply the handle to read it!! Any ideas.

thank you.


Brad Mettee <bmettee Posted on 2013-03-11 15:55:05.0Z
From: Brad Mettee <bmettee@.RemoveMe.pchotshots.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
References: <513dd276$1@forums-1-dub> <513dec53.45d3.1681692777@sybase.com>
In-Reply-To: <513dec53.45d3.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <513dfe59$1@forums-1-dub>
Date: 11 Mar 2013 07:55:05 -0800
X-Trace: forums-1-dub 1363017305 172.20.134.152 (11 Mar 2013 07:55:05 -0800)
X-Original-Trace: 11 Mar 2013 07:55:05 -0800, vip152.sybase.com
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249879
Article PK: 1308268

I think you mis-understand the usage of the REG file.

It's a one time change to the way Windows associates your new file type
with a program. You run REGEDIT, it registers the .REG file with
windows, and makes the changes listed in the file. From that point on,
the new .ANY extension will always be associated with your program.

Here's an example:
- Developer (you) creates an installer (that either uses the .REG file
or makes the changes using the installer itself), registers .ANY with
the windows shell to open your program when a file ending in .ANY gets
double clicked (or right click, open/edit/whatever)
- User opens Windows Explorer ("My Computer" or similar) gets to the
desired folder & file, then double clicks "This-Is-A-Sample.ANY"
- Your program opens, receives one parameter representing the file that
was double-clicked (or opened), and continues from there.

What it sounds like you want to do is completely different. You simply
want to call another program and send it an argument to act on. This can
be done using the PB Run command OR the RunAndWait NVO that Roland Smith
has on his free code page
(http://www.topwizprogramming.com/freecode_runandwait.html).

Let us know if this is what you are trying to accomplish:
- Your main application creates file, puts data in it, closes file
- Your main app calls a second app, passes it file name to use, waits
for it to complete
- Second app opens file name sent to it, does some processing, finishes
and closes
- Main app continues processing after 2nd app is done

Hope this helps

On 3/11/2013 10:38 AM, Ajay wrote:
>> That is what said to do in my initial reply. The registry
>> file I provided is what happens behind the scenes to the
>> registry when you associate a file extension from Windows
>> Explorer.
> Great to see your response. Now, I am trying to read that
> file from the open event of application. But unfortunately
> this file opened by Powerbuilder application and am not able
> to supply the handle to read it!! Any ideas.
>
> thank you.
>


Ajay Posted on 2013-03-11 17:11:32.0Z
Sender: 4ecd.513e0e09.1804289383@sybase.com
From: Ajay
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: File Type Association
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <513e1044.4f8d.1681692777@sybase.com>
References: <513dfe59$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 11 Mar 2013 09:11:32 -0800
X-Trace: forums-1-dub 1363021892 172.20.134.41 (11 Mar 2013 09:11:32 -0800)
X-Original-Trace: 11 Mar 2013 09:11:32 -0800, 172.20.134.41
Lines: 68
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249881
Article PK: 1308276

Hi Brad,
What You explained in the former part about associating .ANY
file with a given program is correct. And that was I was
trying to do. Now, I got it working both ways. Actually I
was opening up a WinRt application from Powerbuilder and
json file to it. In the same manner I was trying to
accomplish backwards. I was able to get the name of the file
using CommandParm() but was not able to read it. The reason
was because trim was not removing double quotes around the
received file name. Now, I have removed it using mid
function and Powerbuilder is able to show me the contents of
the file.
It is interesting to see both applications communicating to
each other with little effort.

Thank you for all your efforts.

> I think you mis-understand the usage of the REG file.
>
> It's a one time change to the way Windows associates your
> new file type with a program. You run REGEDIT, it
> registers the .REG file with windows, and makes the
> changes listed in the file. From that point on, the new
> .ANY extension will always be associated with your
> program.
>
> Here's an example:
> - Developer (you) creates an installer (that either uses
> the .REG file or makes the changes using the installer
> itself), registers .ANY with the windows shell to open
> your program when a file ending in .ANY gets double
> clicked (or right click, open/edit/whatever) - User opens
> Windows Explorer ("My Computer" or similar) gets to the
> desired folder & file, then double clicks
> "This-Is-A-Sample.ANY" - Your program opens, receives one
> parameter representing the file that was double-clicked
> (or opened), and continues from there.
>
> What it sounds like you want to do is completely
> different. You simply want to call another program and
> send it an argument to act on. This can be done using the
> PB Run command OR the RunAndWait NVO that Roland Smith
> has on his free code page
> (http://www.topwizprogramming.com/freecode_runandwait.html
> ).
>
> Let us know if this is what you are trying to accomplish:
> - Your main application creates file, puts data in it,
> closes file - Your main app calls a second app, passes it
> file name to use, waits for it to complete
> - Second app opens file name sent to it, does some
> processing, finishes and closes
> - Main app continues processing after 2nd app is done
>
> Hope this helps
>
> On 3/11/2013 10:38 AM, Ajay wrote:
> >> That is what said to do in my initial reply. The
> registry >> file I provided is what happens behind the
> scenes to the >> registry when you associate a file
> extension from Windows >> Explorer.
> > Great to see your response. Now, I am trying to read
> > that file from the open event of application. But
> > unfortunately this file opened by Powerbuilder
> > application and am not able to supply the handle to read
> it!! Any ideas. >
> > thank you.
> >