Topic: Add Pin Development....  (Read 3133 times)

0 Members and 1 Guest are viewing this topic.

Add Pin Development....
« on: September 30, 2010, 07:14:48 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
News:
I spend some time on pin adding api to pe3 projects, following Rui Paz requests,
Well since I am not a pe3 fan, I am not %100 sure (+not tested), but
it seems to me a special feature of win7 explorer shell.

Anyway, first idea was
Add_Pin, api

but recently I changed it to
Add_Feature,Pin, api
for usual reasons. So when another special Feature requested by api (either explorer shell or other) than Add_Feature, can be easly expanded.

Well currently waiting e-mail response for some final cut, hoping it will end very nearly (fastest 2 days).
« Last Edit: January 01, 2013, 08:37:31 PM by Lancelot »

Re: Capi news
« Reply #1 on: September 30, 2010, 08:04:35 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
Yep, good idea of yours as always to leave room for expandability in future.

Regards,
Galapo.

Re: Capi news
« Reply #2 on: October 03, 2010, 05:28:08 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
Minor update:

Well, Informations and Requests provided by Max_Real QNX and Rui Paz differs.
Rui Paz design requires 2 parameters (+1 adding pin itsself =3) + location of file (4)
1: number for the order of the pin (between 0-9)
2: location of pin (taskbar or startmenu)

Max_Real QNX recently told me .lnk is a must for pin feature and asked adding Pin to type for Add_Shortcut
I tried** to explain him
+ Pin is a feature of Explorer, not related to Add_Shortcut.
+ number of order missing in his design
+ too many parameters already exists in Add_Shortcut and I do not want to slow down Add_Shortcut for a feature of explorer shell (than others also can make demands for the extra shell features from Add_Shorcut....)

Besides, creating shortcut and pin idea sounds very reasonable to me, it would avoid shortcut location changes... but how.

Currently my idea is having an api that would call both Add_Shortcut and Add_Feature,Pin
Add_Shortcut would create a shortcut on different location with a "Type" adding. (Add_Shortcut,Pinlnks)
ex: X:\Windows\System32\Pinlnks\...blabla.lnk
Than this blabla.lnk added to Pin list by Add_Feature,Pin

Well, I wait reply from Rui Paz for clearifications.

It is hard to communicate with Max_Real QNX, he seems not understand my concerns of having good and not future troubled capi additions, besides I think not read my e-mails carelfully too....

Communicatons through e-mails cause a set of delays too....

I am trying my best. :turtle:

Re: Capi news
« Reply #3 on: October 06, 2010, 12:48:58 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
Hi Galapo,

I am not sure about this new capi

Exclude folder from UnUPXing="Require,NoUnUPX,Exlusion_file,folder_path_to_exclude"

Since "Exlusion_file" is the file that keeps the NoUnUPX list, I think it should be determined by project, not end user.
==>
Exclude folder from UnUPXing="Require,NoUnUPX,folder_path_to_exclude"
-->
[Expand_FileX1_NoUnUPX]
If,Not,ExistFile,%ProjectTemplates%\NoUnUPX.txt,FileCreateBlank,%ProjectTemplates%\NoUnUPX.txt
TXTAddLine,%ProjectTemplates%\NoUnUPX.txt,#2,APPEND


Further combining with the idea of future expandibility (to be able to keep File option at hand)
==>
Exclude folder from UnUPXing="Require,NoUnUPX,Folder,folder_path_to_exclude"
-->
[Expand_FileX1_NoUnUPX]
If,Not,ExistFile,%ProjectTemplates%\NoUnUPX.txt,FileCreateBlank,%ProjectTemplates%\NoUnUPX.txt
If,#2,Equal,Folder,TXTAddLine,%ProjectTemplates%\NoUnUPX.txt,#3,APPEND

what you think ?

Re: Capi news
« Reply #4 on: October 06, 2010, 01:25:06 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
Hmm, you are right -- I don't think I was thinking properly when I left the Exlusion_file up to the script writer to specify.

I'll correct this a bit later, just got a few other things to do at the moment.

Regards,
Galapo.

Re: Capi news
« Reply #5 on: October 06, 2010, 02:05:57 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
Take your time,
we are not in a hurry for barbecue  :wink:
I am off for tonight....

I will try to look add pin tomorrow.

here are updates about pin adding:
win7 pin adding is working side by side with .lnk files.
What hapening is, when user add pin, a shortcut created somewhere under profile folder  :lol:
Hence for pin add api, we need similar like Add_Shortcut (since too many parameters, I can not use Add_Feature and better use Add_Shortcut for them to code more easly with similarities..)
Add_Shortcut,Type,StartMenuFolder,(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3),ToolTipText(only Gena/LiveXP)

there are 2 types of pin adding , StartMenu and Taskbar, no startmenu folder..
In addition, there is order between 0-9 to determine where pin prefered to be seen (at first or last)

Add_Pin,Type,Order,(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3),ToolTipText(only Gena/LiveXP)

Type: StartMenu or Taskbar
Order: 0 - 9 OR Auto OR if no value given it is Auto

Auto checks previously given numbers and assaign a number for the task. (it was already coded on previous design)...

Well I will demonstrate hopefully tomorrow......

Good night.

Re: Capi news
« Reply #6 on: October 07, 2010, 11:33:06 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
Hi Lancelot,

I put a new CAPI to server yesterday which takes into account your improvements for 'Require,NoUnUPX'.

Regards,
Galapo.

Re: Capi news
« Reply #7 on: October 07, 2010, 04:19:27 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
Hi Galapo,

thanks  :great:
sorry my mind mixed about catching capi changes  :w00t: now I catch you  :thumbsup:

add pin waiting my turtle speed and free time  :turtle: .....
See you  :yawn:

Re: Capi news
« Reply #8 on: October 11, 2010, 01:02:17 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
here are news from add_pin api.

in the end it become very full shortcut api with only difference, created shortcuts will be pinned  :grin:

in order to prevent possible future problems of adding new things, I added all shortcut parameters

Add_Pin,Type,Order,(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3)#$cHotKey,ToolTipText

here is the last test script which I feel will be the end
http://www.mediafire.com/?3b5q9u5iap22b5f

As far as I can see, The only parameter that have a litttleeee issue on pe2/3 projects is "ToolTipText" since it must not contain "|" , well I do not think it is a problem at all not using "|" hence no need another escape for that ;).

Well please check to see if I miss something.

Max_Real QNX coding pin......exe for that task hopefully finishing tomorrow and probably new capi will be released for both active w7 projects (Leopard - win7pese) tomorrow. (delays may always happen  :w00t:)

Further:
I feel this new pin...exe in time will lead pe2/3 project admins requiring a new api for shortcut, probably slimmed version of pin....exe to shortcut2....exe since this api design provides all shortcut options which are not provided by initial design. To keep backward compatiblility a replacement to [AddShortcut2] will eventually required hence another communication must take place about capi in future.
Well hopefully this time on current (or a new capi) topic.  :magic:

Re: Capi news
« Reply #9 on: October 11, 2010, 01:51:09 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
Great, thanks Lancelot for the news!

Regards,
Galapo.

Re: Capi General :)
« Reply #10 on: October 15, 2010, 06:16:08 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
Hi All,

First:
A request to Galapo,
Can you move current "Capi General" Topic to Capi section.
http://theoven.org//index.php?board=14.0


Second:
And here my concern about Require,NoUnUPX
(I wrote "UNDER CONSTRUCTION" for now)
http://theoven.org//index.php?topic=44.0

Require,NoUnUPX,Folder,%Target_Prog%\%ProgramFolder%

Reminding: %Target_prog%=%TargetDir%\Program Files

with above, unupx batch (and api) can only work as long as %TargetDir% (or its subfolders) used for first parameter of unupx.cmd.

Hardcoded path inside NoUnUPX.txt can be mother of lots of future troubles.
Currently using RunFromRam,True with Gena + above will not result nicely ;) , guess other things that have pottential to happen in future. We are in a good position to fix since this api command not announced and used yet.

My batching skills are lowest compared to all, but here ideas:
As a short workaround:
inside NoUnUPX.txt %~dp1 (or something..) can be used by altering api command to be used alone in a script

Require,NoUnUPX,Folder

in capi script:
[Expand_FileX1_NoUnUPX]
If,Not,ExistFile,%ProjectTemplates%\NoUnUPX.txt,FileCreateBlank,%ProjectTemplates%\NoUnUPX.txt
If,#1,Equal,Folder,Begin
If,-#2-,Equal,--,Begin
If,Not,ExistVar,%ProgramFolder%,HALT,"ProgramFolder variable missing"
StrFormat,FILENAME,%Target_prog%,%Target_prog_Path%
Set,#2,#$p~dp1%ProgramFolder%
End
TXTAddLine,%ProjectTemplates%\NoUnUPX.txt,#2,APPEND
End







Best Fix would be rescuing NoUnUPX.txt from path dependency
using something similar like we had used in Require,Highversion

Require,NoUnUPX,Folder,ProgramFiles,%ProgramFolder%
Require,NoUnUPX,Folder,TargetWin,Subfolder
Require,NoUnUPX,Folder,Root,Subfolder


[Expand_FileX1_NoUnUPX]
If,Not,ExistFile,%ProjectTemplates%\NoUnUPX.txt,FileCreateBlank,%ProjectTemplates%\NoUnUPX.txt
If,#1,Equal,Folder,Begin
If,-#2-,Equal,--,Set,#2,ProgramFiles
If,-#2-,Equal,-ProgramFiles-,Begin
StrFormat,FILENAME,%Target_prog%,%Capi_Target_prog_Folder_NoUnUPX%
Set,#2,%Capi_Target_prog_Folder_NoUnUPX%\
End
If,-#2-,Equal,-TargetWin-,Begin
StrFormat,FILENAME,%Target_Win%,%Capi_Target_Win_Folder_NoUnUPX%
Set,#2,%Capi_Target_Win_Folder_NoUnUPX%\
End
If,-#2-,Equal,-Root-,Set,#2,
If,-#3-,Equal,--,Begin
If,Not,ExistVar,%ProgramFolder%,HALT,"ProgramFolder variable missing"
Set,#3,%ProgramFolder%
End
Set,#9,#$pNuunupxTarget#$p\#2#3
End
TXTAddLine,%ProjectTemplates%\NoUnUPX.txt,#9,APPEND
End


Above api writing %NuunupxTarget% inside NoUnUPX.txt which I guess can be defined by unupx.cmd

Well, these are things in my mind, codes not tested only here to demonstrate what I think. :turtle: feel free to change above code example and all further things, leaving torch to batchers :cheers:

Re: Capi General :)
« Reply #11 on: October 16, 2010, 10:09:47 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
All sounds fine to me and it's needed as you say.

Trouble is, I have no idea really how to go about this with the batch file. AutoIt on the other hand...

Regards,
Galapo.

Re: Capi General :)
« Reply #12 on: October 16, 2010, 10:59:22 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
time to knock a door at India  :embarrassed:

Re: Capi General :)
« Reply #13 on: October 17, 2010, 03:11:05 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1911
Nevermind -- I figured out a way to accomplish the task.

New scripts on server:
Common_Api.script
BootDI.script
WimBoot.script

Regards,
Galapo.

Re: Capi General :)
« Reply #14 on: October 17, 2010, 06:13:36 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 6945
I like solution  :thumbsup:  :great:

 

Powered by EzPortal