Author Topic: "Of The Bay" Version 2.00  (Read 44318 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: "Of The Bay"
« Reply #45 on: November 20, 2008, 09:08:36 AM »
Emil,

Thank you for the feedback.

Next step i plan to add the hability to customize the dockbar with a shorcut list (kind of playlist) on the same model i have done for the *.zsk file but with the *.OTB extension.

In this OTB file you will be able to specify the icon you want to use, either 32x32 or 48x48, and the shorcut properties.
If there is already an existing shortcut (same target) then the OTB properties will take preseance.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

  • Guest
Re: "Of The Bay"
« Reply #46 on: November 20, 2008, 07:04:13 PM »
Emil,

Thank you for the feedback.

Next step i plan to add the hability to customize the dockbar with a shorcut list (kind of playlist) on the same model i have done for the *.zsk file but with the *.OTB extension.

In this OTB file you will be able to specify the icon you want to use, either 32x32 or 48x48, and the shorcut properties.
If there is already an existing shortcut (same target) then the OTB properties will take preseance.

...


Missing the background picture (Desktop)
greets Emil

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Version 1.50 - Another major revision with full customization (OTB file).
« Reply #47 on: November 20, 2008, 09:25:29 PM »
This one is another big step forward with the introduction of the "OfTheBay.OTB" file, that allows you to fully customize the dockbar.

OfTheBay.OTB is a plain ASCII text file that looks like this:

Code: [Select]
'+--------------------------------------------------------------------------+
'|                               Of The Bay                                 |
'|                                                                          |
'|                         User shorcut definition                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|                            copyright(c) 2008                             |
'|                           www.zapsolution.com                            |
'|                         support@zapsolution.com                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                  Project started on : 11-20-2008 (MM-DD-YYYY)            |
'|                        Last revised : 11-20-2008 (MM-DD-YYYY)            |
'+--------------------------------------------------------------------------+

'Use @PATH@ to match either the OfTheBay.EXE path or the ShellTo target path

'Icon:
'Use either 32x32 or larger (will be converted to 48x48)
'in case of 32x32 the program adds the active icon background else not.

'"ShellTo, UseLabel, IconName, WorkDir, CmdLine"

'"C:\travail\sdk\template\BassBox24\BassBox.exe, BassBox24, @PATH@UserIcon\Solid edge.png,     @PATH@,  "
"C:\travail\sdk\template\BassBox24\BassBox.exe, BassBox24, @PATH@UserIcon\Woofer256x256.png,   @PATH@,  "
"C:\travail\sdk\template\MovieBox2\MovieBox.exe, MovieBox, @PATH@UserIcon\MovieProjector.png,  @PATH@,  "


Each line defines a specific shortcut with five parameters:
1 - "ShellTo" is the shorcut target.
2 - "UseLabel" is the name to display below the icon.
3 - "IconName" is the full path name to the image you want to use as icon (any supported graphic format).
4 - "WorkDir" is the working directory to use for the shortcut, @PATH@ means use EXE's folder.
5 - "CmdLine" an optional command line to pass to the shortcut.

About the image being used to create the icon, PNG is the best format because it has built-in alpha channel.
You can use image of any size, but the rule is:
IF the size of the image is larger than 32x32 then
   it will be resized to 48x48 and shown without the icon frame background.
ELSE IF the size is 32x32 then
   it will be drawn the standard way with a frame background.

The program allows you to redefine a shorcut that already exists on the Windows desktop, then it will use the parameters of the OTB file.

NOTE: Better to put all the image you want to use into a dedicated folder, i am using myself a subfolder named: UserIcon

Here is an example of the result you can get:



As you can see, i have replaced both the "BassBox" and "MovieBox" icon with larger one, that are stored in the "UserIcon" folder.

The OTB file could also be used as "super menu" to navigate between the different popup windows of a large project.

That's all for now.

...
 
 
« Last Edit: November 21, 2008, 08:26:50 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" has a new menu option to change the desktop wallpaper
« Reply #48 on: November 21, 2008, 07:12:28 PM »
Under request of Emil Weiss,

I have added a new menu option to change the desktop wallpaper.

The background image will be resized to match the primary desktop size, while preserving the ratio aspect of the original picture.

Added:
The Wallpaper icon was missing from the zip file, it has been added to the resource folder.

...

« Last Edit: November 21, 2008, 07:21:03 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: "Of The Bay"
« Reply #49 on: November 22, 2008, 11:25:38 AM »
While working on the problem to center a common DIALOG OPEN/SAVE on multiple display,
i found that the best solution to detect the size of the monitor hover by the hMainWindow application is to use this code:

Code: [Select]
LOCAL hMonitor AS LONG, tmi AS MONITORINFO
hMonitor = MonitorFromWindow(hMainWindow, %MONITOR_DEFAULTTONEAREST)
tmi.cbSize = SIZEOF(tmi)
IF GetMonitorInfo(hMonitor, tmi) THEN
   msgbox str$(tmi.rcWork.nLeft)+str$(tmi.rcWork.nRight)+str$(tmi.rcWork.nTop)+str$(tmi.rcWork.nBottom)
END IF
« Last Edit: November 22, 2008, 11:27:37 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" version 1.54 (with custom icon set)
« Reply #50 on: November 23, 2008, 03:09:11 PM »
Updated to version 1.54

This one allows you to substitute your own icon set, to replace the default extracted from the shorcut targets.

Note: My custom icon set is stored in the "UserIcon" subfolder.

To use a custom icon set, you must have a valid OTB file in the same folder than "OfTheBay.exe", and it must be named "OfTheBay.OTB".

Here is an example of OTB file, that must be customized according to your own shortcuts:

Code: [Select]
'+--------------------------------------------------------------------------+
'|                               Of The Bay                                 |
'|                                                                          |
'|                         User shorcut definition                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|                            copyright(c) 2008                             |
'|                           www.zapsolution.com                            |
'|                         support@zapsolution.com                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                  Project started on : 11-20-2008 (MM-DD-YYYY)            |
'|                        Last revised : 11-20-2008 (MM-DD-YYYY)            |
'+--------------------------------------------------------------------------+

'Use @PATH@ to match either the OfTheBay.EXE path or the ShellTo target path

'Icon:
'Use either 32x32 or larger (will be converted to 48x48)
'in case of 32x32 the program adds the active icon background else not.

'"ShellTo, UseLabel, IconName, WorkDir, CmdLine"

"Ordinateur, Ordinateur, @PATH@UserIcon\Computer_48x48.png, , "
"C:\program files\cc hyper file\cc120hf.exe, Centre de Contrôle HF, @PATH@UserIcon\Control_48x48.png, @PATH@, "
"C:\Program Files\Google\Picasa3\Picasa3.exe, Picasa 3, @PATH@UserIcon\Picasa48x48.png, @PATH@,  "
"D:\SED\SED_116.exe, PBWin9, @PATH@UserIcon\PowerBASIC_48x48.png, @PATH@, "
"D:\Disque_P\AssignDsk.bat, Promotech, @PATH@UserIcon\Param1_48x48.png,  D:\Disque_P,  "
"C:\Program Files\Phoenix\Bin\PHOENIX.EXE, Phoenix, @PATH@UserIcon\Phoenix_48x48.png, , "
"C:\travail\sdk\template\BassBox24\BassBox.exe, BassBox24, @PATH@UserIcon\Woofer48x48.png,   @PATH@,  "
"C:\Program Files\HP\QuickPlay\QP.exe, QuickPlay, @PATH@UserIcon\QuickPlay_48x48.png, @PATH@, "
"D:\wd11-us\programs\windev11.exe, WD11 US, @PATH@UserIcon\WD11_48x48.png, @PATH@, "
"C:\travail\sdk\template\MovieBox2\MovieBox.exe, MovieBox, @PATH@UserIcon\MovieProjector.png,  @PATH@,  "
"C:\windev 12\programmes\windev12.exe, WinDev 12, @PATH@UserIcon\WD12_48x48.png, @PATH@, "
"C:\program files\vahelp\vahelp73.exe, HelpMaker, @PATH@UserIcon\Vizacc_48x48.png, @PATH@, "
"C:\windev 12\zoleigest.bat, Z oleigest, @PATH@UserIcon\Run_48x48.png, @PATH@, "
"Corbeille, Corbeille, @PATH@UserIcon\Trash_48x48.png, , "
"C:\windows\installer\{e4ddba93-769b-49d8-ba33-8814e45ed0c1}\_40c4cb6f6690400fa04ba2.exe, HP Help and Support, @PATH@UserIcon\HP_48x48.png, C:\Windows\Help\OEM\scripts\, "
"C:\windev 10\programmes\windev10.exe, WinDev 10, @PATH@UserIcon\WD10_48x48.png, @PATH@, "
"C:\windev11\programmes\windev11.exe, WinDev 11, @PATH@UserIcon\WD11_48x48.png, @PATH@, "
"C:\WinDev 10\disquez.bat, Disque Z, @PATH@UserIcon\HD_48x48.png, C:\WinDev 10,  "
"C:\Windows\System32\cmd.exe, Prompt, @PATH@UserIcon\Prompt_48x48.png, C:\travail,  "
"Son - Raccourci, Son - Raccourci, @PATH@UserIcon\Sound_48x48.png, , "
"C:\Windows\installer\{5c82dae5-6eb0-4374-9254-be3319ba4e82}\skype.ico, Skype, @PATH@UserIcon\Skype_48x48.png, C:\Program Files\Skype\,  "
"C:\VS2005\zMoviePlayer\bin\Debug\zMoviePlayer.exe, zMoviePlayer, @PATH@UserIcon\MediaPlayer_48x48.png, @PATH@, " 
"C:\program files\acronis\trueimagehome\trueimage.exe, Acronis True Image Home 10.0, @PATH@UserIcon\Acronis_48x48.png, @PATH@, "
"C:\Program Files\FileZilla Client\filezilla.exe, FileZilla, @PATH@UserIcon\FileZilla_48x48.png, @PATH@, "
"C:\travail\PhotoComposer\PhotoCompo.exe, PhotoComposer, @PATH@UserIcon\PhotoComposer_48x48.png, @PATH@, "
"C:\program files\blender foundation\blender\blender.exe, Blender, @PATH@UserIcon\Blender_48x48.png, @PATH@, "
"C:\travail\sdk\template\goldfish\xpaero\ofthebay\ofthebay.exe, Of The Bay, @PATH@UserIcon\OTB_48x48.png, @PATH@, "
"D:\Photosetup\PhotoSetup.exe, PhotoSetup, @PATH@UserIcon\PhotoSetup48x48.png,  @PATH@,  "


And here is the result of the customization:



...
« Last Edit: November 23, 2008, 06:49:07 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: "Of The Bay"
« Reply #51 on: November 27, 2008, 11:13:46 AM »
Version 1.55

A new parameter has been added to the OTB file:
'"ShellTo, UseLabel, IconName, WorkDir, CmdLine, EnableShortcutTrueFalse"

EnableShortcutTrueFalse = 0, means do not show this shortcut.
EnableShortcutTrueFalse = 1, means show this shortcut.
EnableShortcutTrueFalse = 2, means this shortcut refers to the "Recycle Bin"

"Recycle Bin" is a special shortcut case, because the icon can represent a full or empty recycle bin, thus you must provide two custom icons for it, and they must be named "RecycleBinEmpty.png" and "RecycleBinFull.png".

Example of version 1.55 custom OTB file:

Code: [Select]
'+--------------------------------------------------------------------------+
'|                               Of The Bay                                 |
'|                                                                          |
'|                         User shorcut definition                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|                            copyright(c) 2008                             |
'|                           www.zapsolution.com                            |
'|                         support@zapsolution.com                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                  Project started on : 11-20-2008 (MM-DD-YYYY)            |
'|                        Last revised : 11-20-2008 (MM-DD-YYYY)            |
'+--------------------------------------------------------------------------+

'Use @PATH@ to match either the OfTheBay.EXE path or the ShellTo target path

'Icon:
'Use either 32x32 or larger (will be converted to 48x48)
'in case of 32x32 the program adds the active icon background else not.

'"ShellTo, UseLabel, IconName, WorkDir, CmdLine, EnableShortcutTrueFalse"
'EnableShortcutTrueFalse = 2 '// To inform OTB that this one refers to the "Recycle Bin"

"Ordinateur, Ordinateur, @PATH@UserIcon\48x48\Computer.png, , ,1"
"C:\program files\cc hyper file\cc120hf.exe, Centre de Contrôle HF, @PATH@UserIcon\48x48\Control.png, @PATH@, ,1"
"C:\Program Files\Google\Picasa3\Picasa3.exe, Picasa 3, @PATH@UserIcon\48x48\Picasa.png, @PATH@, ,1"
"D:\SED\SED_116.exe, PBWin9, @PATH@UserIcon\48x48\PowerBASIC.png, @PATH@, ,1"
"D:\Disque_P\AssignDsk.bat, Promotech, @PATH@UserIcon\48x48\Param1.png, @PATH@, ,1"
"C:\Program Files\Phoenix\Bin\PHOENIX.EXE, Phoenix, @PATH@UserIcon\48x48\Phoenix.png, , ,1"
"C:\travail\sdk\template\BassBox24\BassBox.exe, BassBox24, @PATH@UserIcon\48x48\Woofer.png, @PATH@, ,1"
"C:\Program Files\HP\QuickPlay\QP.exe, QuickPlay, @PATH@UserIcon\48x48\QuickPlay.png, @PATH@, ,1"
"D:\wd11-us\programs\windev11.exe, WD11 US, @PATH@UserIcon\48x48\WD11.png, @PATH@, ,1"
"C:\travail\sdk\template\MovieBox2\MovieBox.exe, MovieBox, @PATH@UserIcon\48x48\MovieProjector.png, @PATH@, ,1"
"C:\windev 12\programmes\windev12.exe, WinDev 12, @PATH@UserIcon\48x48\WD12.png, @PATH@, ,1"
"C:\program files\vahelp\vahelp73.exe, HelpMaker, @PATH@UserIcon\48x48\Vizacc.png, @PATH@, ,1"
"C:\windev 12\zoleigest.bat, Z oleigest, @PATH@UserIcon\48x48\Run.png, @PATH@, ,1"
"Corbeille, Corbeille, @PATH@UserIcon\48x48\RecycleBinEmpty.png, , ,2" '// This one refers to the "Recycle Bin"
"C:\windows\installer\{e4ddba93-769b-49d8-ba33-8814e45ed0c1}\_40c4cb6f6690400fa04ba2.exe, HP Help and Support, @PATH@UserIcon\48x48\HP.png, C:\Windows\Help\OEM\scripts\, ,1"
"C:\windev 10\programmes\windev10.exe, WinDev 10, @PATH@UserIcon\48x48\WD10.png, @PATH@, ,1"
"C:\windev11\programmes\windev11.exe, WinDev 11, @PATH@UserIcon\48x48\WD11.png, @PATH@, ,1"
"C:\WinDev 10\disquez.bat, Disque Z, @PATH@UserIcon\48x48\HD.png, C:\WinDev 10, ,1"
"C:\Windows\System32\cmd.exe, Prompt, @PATH@UserIcon\48x48\Prompt.png, C:\travail, ,1"
"Son - Raccourci, Son - Raccourci, @PATH@UserIcon\48x48\Sound.png, , ,1"
"C:\Windows\installer\{5c82dae5-6eb0-4374-9254-be3319ba4e82}\skype.ico, Skype, @PATH@UserIcon\48x48\Skype.png, C:\Program Files\Skype\, ,1"
"C:\VS2005\zMoviePlayer\bin\Debug\zMoviePlayer.exe, zMoviePlayer, @PATH@UserIcon\48x48\MediaPlayer.png, @PATH@, ,1" 
"C:\program files\acronis\trueimagehome\trueimage.exe, Acronis True Image Home 10.0, @PATH@UserIcon\48x48\Acronis.png, @PATH@, ,1"
"C:\Program Files\FileZilla Client\filezilla.exe, FileZilla, @PATH@UserIcon\48x48\FileZilla.png, @PATH@, ,1"
"C:\travail\PhotoComposer\PhotoCompo.exe, PhotoComposer, @PATH@UserIcon\48x48\PhotoComposer.png, @PATH@, ,1"
"C:\program files\blender foundation\blender\blender.exe, Blender, @PATH@UserIcon\48x48\Blender.png, @PATH@, ,1"
"C:\travail\sdk\template\goldfish\xpaero\ofthebay\ofthebay.exe, Of The Bay, @PATH@UserIcon\48x48\OTB.png, @PATH@, ,0" ' <-- Hide OTB
"D:\Photosetup\PhotoSetup.exe, PhotoSetup, @PATH@UserIcon\48x48\PhotoSetup.png, @PATH@, ,1"

Note: If there is no "OfTheBay.OTB" file into the EXE's folder, then the program uses the default 32x32 icon embedded into the shorcut target.

The "UserIcon" folder has a subfolder named "48x48" to store large icon, but you can add a new "32x32" subfolder to store your custom icons if you want them to be surrounded with the icon frame background.

I have attached to this post the latest public version 1.55.
It is provided with a "OfTheBay.OTB.txt" file, that must be renamed "OfTheBay.OTB" after it has been customized to match your own need.

.

 
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" source code utility to create a custom OTB file
« Reply #52 on: November 27, 2008, 07:06:40 PM »
Here is the DoOTB utility that creates a default OTB file that you can customize to match your specific needs.


Source code:

Code: [Select]
'+--------------------------------------------------------------------------+
'|                                 DoOTB                                    |
'|                                                                          |
'|   Create a "Default.OTB" to be used as template to create a customized   |
'|                          "OfTheBay.OTB" file.                            |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|                            copyright(c) 2008                             |
'|                           www.zapsolution.com                            |
'|                        pterrier@zapsolution.com                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                  Project started on : 11-27-2008 (MM-DD-YYYY)            |
'|                        Last revised : 11-27-2008 (MM-DD-YYYY)            |
'+--------------------------------------------------------------------------+

#COMPILE EXE "DoOTB.exe"

#INCLUDE "Win32API.inc"
#INCLUDE "GDImage.inc"
#INCLUDE "OfTheBay.inc"

'------------------------------------------------------------------------------------------
' LOCAL section
'-----------------------------------------------------------------------------------------

TYPE gSpriteArrayStruct
    ShellTo   AS ASCIIZ * 260
    IconPath  AS ASCIIZ * 260
    WorkDir   AS ASCIIZ * 260
    UseLabel  AS ASCIIZ * 128
    CmdLine   AS ASCIIZ * 260
    ShowCmd   AS LONG
END TYPE

''''''''''''''''''''''''''''''''''''''''''''

''''''''''''''''''''''''''''''''''''''''''''

SUB WriteOTB(BYVAL sMsg AS STRING) STATIC
    DIM szFileName AS ASCIIZ * %MAX_PATH
    DIM hDebug AS LONG
    DIM NeverBeenThere AS LONG
    IF hDebug AND LEN(sMsg$) = 0 THEN
       CALL zsFClose(hDebug)
       NeverBeenThere = 0
       EXIT SUB
    END IF
    IF NeverBeenThere = 0 THEN
       NeverBeenThere = -1
       szFileName = "Default.OTB"
       CALL zsKillFile(szFileName)
       CALL zsFOpen(szFileName, 2, 4, hDebug)
    END IF
    CALL zsFPut(hDebug, sMsg + $CRLF)
END SUB

'// Main entry point
FUNCTION WINMAIN (BYVAL hInstance     AS LONG, _
                  BYVAL hPrevInstance AS LONG, _
                  BYVAL lpCmdLine     AS ASCIIZ PTR, _
                  BYVAL iCmdShow      AS LONG) AS LONG

    DIM gS(1 TO 1) AS gSpriteArrayStruct

    LOCAL hProgMan, hListView AS DWORD
    LOCAL K, nCount, nItemCount AS LONG, sLink, sEnableShortcutTrueFalse AS STRING

    hProgMan  = FindWindow("Progman", "Program Manager")
    hListView = FindWindowEx(hProgMan, 0, "SHELLDLL_DefView", "")
    hListView = FindWindowEx(hListView, 0, "SysListView32", "FolderView")
    nItemCount = SendMessage(hListView, %LVM_GETITEMCOUNT, 0, 0)
    IF nItemCount THEN
       LOCAL dwProcessId, hProcess, dwSize, lpData AS DWORD
       CALL GetWindowThreadProcessId(hListView, dwProcessId)
       hProcess = OpenProcess(%PROCESS_VM_OPERATION OR %PROCESS_VM_READ OR %PROCESS_VM_WRITE, %FALSE, dwProcessId)
       IF hProcess THEN
          '// Compute the size of our reserved memory buffer
          dwSize = SIZEOF(POINTAPI) + SIZEOF(LVITEM) + %MAX_PATH * 2

          lpData = VirtualAllocEx(hProcess, BYVAL %NULL, dwSize, %MEM_COMMIT, %PAGE_READWRITE)
          IF lpData THEN

             LOCAL pWsh AS IWshShell
             pWsh = NEWCOM "WScript.Shell"
             LOCAL pLnk AS IWshShortcut

             LOCAL sDeskTopPub, sDeskTopAdm AS STRING
             sDeskTopAdm = zsFolderGet(%CSIDL_DESKTOP)
             sDeskTopPub = zsFolderGet(%CSIDL_COMMON_DESKTOPDIRECTORY)
             '// Setup pointers
             LOCAL lpPosition, lpItem, lpText AS LONG
             lpPosition = lpData
             lpItem = lpData + SIZEOF(POINTAPI)
             lpText = lpData + SIZEOF(POINTAPI) + SIZEOF(LVITEM)

             LOCAL lvi AS LVITEM
             LOCAL szTxt AS ASCIIZ * 128, szLnk AS ASCIIZ * (%MAX_PATH * 2)  ' Allow room for unicode
             LOCAL DoLnk AS LONG
             FOR K = 0 TO nItemCount - 1
                 '// Init LVITEM structure and copy it to our reserved memory buffer
                 lvi.mask       = %LVIF_TEXT
                 lvi.iItem      = K
                 lvi.iSubItem   = 0
                 lvi.pszText    = lpText
                 lvi.cchTextMax = %MAX_PATH * 2
                 CALL WriteProcessMemory(hProcess, lpItem, lvi, sizeof(LVITEM), 0)
                 '// Get text label and x,y location
                 CALL SendMessage(hListView, %LVM_GETITEMTEXT, K, lpItem)
                 CALL SendMessage(hListView, %LVM_GETITEMPOSITION, K, lpPosition)
                 '// Copy from process memory to local variables
                 szTxt = ""
                 CALL ReadProcessMemory(hProcess, lpText, szTxt, SIZEOF(szTxt), 0)
                 LOCAL p AS POINTAPI
                 CALL ReadProcessMemory(hProcess, lpPosition, p, SIZEOF(POINTAPI), 0)
                 IF LEN(szTxt) THEN szLnk = szTxt + ".lnk"

                 IF ISFILE(sDeskTopAdm + szLnk) THEN
                    sLink = sDeskTopAdm + szLnk
                 ELSEIF ISFILE(sDeskTopPub + szLnk) THEN
                    sLink = sDeskTopPub + szLnk
                 ELSE
                    sLink = ""
                 END IF

                 sTarget$ = ""
                 IF LEN(sLink) THEN
                    DoLnk = -1
                    pLnk = pWsh.CreateShortcut(UCODE$(sLink))
                    sTarget$ = RTRIM$(ACODE$(pLnk.TargetPath))
                    IF LEN(sTarget$) = 0 THEN sTarget$ = ResolveLnk((sLink))
                 ELSE
                    DoLnk = 0
                    sTarget$ = ResolveShortcutName(szTxt)
                 END IF
                 IF LEN(sTarget$) THEN
                    INCR nCount
                    REDIM PRESERVE gS(1 TO nCount)
                    gs(K).IconPath = "@PATH@UserIcon\48x48\????.png"
                    IF DoLnk THEN gS(nCount).ShellTo = LCASE$(ACODE$(pLnk.TargetPath))
                    IF DoLnk THEN gS(nCount).WorkDir = ACODE$(pLnk.WorkingDirectory)
                    gS(nCount).UseLabel = szTxt
                    IF DoLnk THEN gS(nCount).ShowCmd = pLnk.WindowStyle
                 END IF
             NEXT

             '// Freeup memory
             CALL VirtualFreeEx(hProcess, lpData, 0, %MEM_RELEASE)

          END IF

          '// Close process
          CALL CloseHandle(hProcess)
         
          LET pWsh = NOTHING
         
       END IF
    END IF
   
    IF nCount THEN
   
       WriteOTB "'+--------------------------------------------------------------------------+"
       WriteOTB "'|                               Of The Bay                                 |"
       WriteOTB "'|                                                                          |"
       WriteOTB "'|                         User shorcut definition                          |"
       WriteOTB "'|                                                                          |"
       WriteOTB "'+--------------------------------------------------------------------------+"
       WriteOTB "'|                                                                          |"
       WriteOTB "'|                         Author Patrice TERRIER                           |"
       WriteOTB "'|                            copyright(c) 2008                             |"
       WriteOTB "'|                           www.zapsolution.com                            |"
       WriteOTB "'|                         support@zapsolution.com                          |"
       WriteOTB "'|                                                                          |"
       WriteOTB "'+--------------------------------------------------------------------------+"
       WriteOTB "'Use @PATH@ to match either the OfTheBay.EXE path or the ShellTo target path"
       WriteOTB "'"
       WriteOTB "'Icon:"
       WriteOTB "'Use either 32x32 or larger (will be converted to 48x48)"
       WriteOTB "'in case of 32x32 the program adds the active icon background else not."
       WriteOTB "'"
       WriteOTB "'""ShellTo, UseLabel, IconName, WorkDir, CmdLine, EnableShortcutTrueFalse"""
       WriteOTB "'EnableShortcutTrueFalse = 2 '// To inform OTB that this one refers to the ""Recycle Bin"""
       WriteOTB "'"
       WriteOTB "'Replace ""@PATH@UserIcon\48x48\????.png"" with a custom PNG file."
       WriteOTB "'"
       FOR K = 1 TO nCount
           sEnableShortcutTrueFalse = ", 1"""
           IF LEN(gS(K).ShellTo) = 0 THEN
              gS(K).ShellTo = gS(K).UseLabel
           ELSE
              IF INSTR(gS(K).ShellTo, "ofthebay.exe") THEN sEnableShortcutTrueFalse = ", 0""" ' Don't show it
              IF PATHNAME$(PATH, gS(K).ShellTo) = RTRIM$(LCASE$(gS(K).WorkDir), "\") + "\" THEN gS(K).WorkDir = "@PATH@"
           END IF
           WriteOTB """" + gS(K).ShellTo + ", " + gS(K).UseLabel + ", " + gs(K).IconPath + ", " + gS(K).WorkDir + ", " + gS(K).CmdLine + sEnableShortcutTrueFalse
       NEXT
       WriteOTB "'"
       WriteOTB "'End of file."
       WriteOTB ""
    END IF

    MsgBox """Default.OTB"" file, has been created." + $cr + $cr + _
           "You must edit and save it under the name of:" + $cr + _
           """OfTheBay.OTB""", , "Of The Bay"

END FUNCTION

Instructions for use are provided into the resulting OTB file.
...
« Last Edit: November 28, 2008, 11:55:57 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" version 1.56 (close to full completion)
« Reply #53 on: November 28, 2008, 12:04:38 PM »
I think with version 1.56 we are close to full completion.

The new ZIP file (attached to the first post of this thread) is provided with both "OfTheBay.exe" and "DoOTB.exe" source code.

DoOTB allows you to create a "Default.OTB" file that you can customize with any ASCII text editor and save under the name of "OfTheBay.OTB".

If ever you download this new version, i would be glad to know if you have been able to setup your own OTB file, if not ask me there what to do.

Thank you!

...

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" version 1.57
« Reply #54 on: December 15, 2008, 07:45:57 PM »
Under request of Martin Francom, the "shorcut target path" is now shown on the dock, when you hold down the right mouse button, while hover a DockBar icon.

The lattest ZIP file with source code is attached to the first post of this thread.

The public version without source code and without "nag screen" is there.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" version 1.60 (with embedded OTB file generator)
« Reply #55 on: December 17, 2008, 08:08:27 PM »
OfTheBay has been enhanced with a new menu option to create/update the "OfTheBay.OTB" file,
that would let you customize the shorcuts with your own set of icons, or hide existing shorcut(s), and/or add new OTB shortcut(s).


Example of "OfTheBay.OTB" file:

Code: [Select]
'+--------------------------------------------------------------------------+
'|                               Of The Bay                                 |
'|                                                                          |
'|                         User shorcut definition                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|                            copyright(c) 2008                             |
'|                           www.zapsolution.com                            |
'|                         support@zapsolution.com                          |
'|                                                                          |
'+--------------------------------------------------------------------------+
'| Build on: 12-17-2008                                                     |
'+--------------------------------------------------------------------------+
'
'Use @PATH@ to match either the OfTheBay.EXE path or the ShellTo target path
'
'Icon:
'Use either 32x32 or larger (will be converted to 48x48)
'in case of 32x32 the program adds the active icon background else not.
'
'"ShellTo, UseLabel, IconName, WorkDir, CmdLine, EnableShortcutTrueFalse"
'
'EnableShortcutTrueFalse = 0 // Disable this shorcut
'EnableShortcutTrueFalse = 1 // Enable this shorcut
'EnableShortcutTrueFalse = 2 // To inform OTB that this one refers to the "Recycle Bin"
'                            // you must also provide 2 icons named:
'                            // "RecycleBinEmpy.png" and "RecycleBinFull.png"
'
'Replace "@PATH@UserIcon\48x48\????.png" with a custom PNG file.
'
'****************************************************************************
"Ordinateur, Ordinateur, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Computer.png, , , 1"
"c:\program files\cc hyper file\cc120hf.exe, Centre de Contrôle HF, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Control.png, @PATH@, , 1"
"c:\program files\google\picasa3\picasa3.exe, Picasa 3, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Picasa.png, @PATH@, , 1"
"d:\sed\sed_116.exe, PBWin9, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\PowerBASIC.png, @PATH@, , 1"
"d:\disque_p\assigndsk.bat, Promotech, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Param1.png, @PATH@, , 1"
"c:\program files\phoenix\bin\phoenix.exe, Phoenix, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Phoenix.png, , , 1"
"c:\travail\sdk\template\bassbox24\bassbox.exe, BassBox24, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Woofer.png, @PATH@, , 1"
"c:\program files\hp\quickplay\qp.exe, QuickPlay, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\QuickPlay.png, @PATH@, , 1"
"d:\wd11-us\programs\windev11.exe, WD11 US, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\WD11.png, @PATH@, , 1"
"c:\travail\sdk\template\moviebox2\moviebox.exe, MovieBox, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\MovieProjector.png, @PATH@, , 1"
"c:\windev 12\programmes\windev12.exe, WinDev 12, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\WD12.png, @PATH@, , 1"
"c:\program files\vahelp\vahelp73.exe, HelpMaker, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Vizacc.png, @PATH@, , 1"
"c:\windev 12\zoleigest.bat, Z oleigest, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Run.png, @PATH@, , 1"
"Corbeille, Corbeille, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\RecycleBinFull.png, , , 1"
"c:\windows\installer\{e4ddba93-769b-49d8-ba33-8814e45ed0c1}\_40c4cb6f6690400fa04ba2.exe, HP Help and Support, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\HP.png, C:\Windows\Help\OEM\scripts\, , 1"
"c:\windev 10\programmes\windev10.exe, WinDev 10, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\WD10.png, @PATH@, , 1"
"c:\windev11\programmes\windev11.exe, WinDev 11, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\WD11.png, @PATH@, , 1"
"c:\windev 10\disquez.bat, Disque Z, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\HD.png, @PATH@, , 1"
"c:\windows\system32\cmd.exe, Prompt, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Prompt.png, C:\travail, , 1"
"Son - Raccourci, Son - Raccourci, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Sound.png, , , 1"
"c:\windows\installer\{5c82dae5-6eb0-4374-9254-be3319ba4e82}\skype.ico, Skype, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Skype.png, C:\Program Files\Skype\, , 1"
"c:\vs2005\zmovieplayer\bin\debug\zmovieplayer.exe, zMoviePlayer, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\MediaPlayer.png, @PATH@, , 1"
"c:\program files\acronis\trueimagehome\trueimage.exe, Acronis True Image Home 10.0, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Acronis.png, @PATH@, , 1"
"c:\program files\filezilla client\filezilla.exe, FileZilla, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\FileZilla.png, @PATH@, , 1"
"c:\travail\photocomposer\photocompo.exe, PhotoComposer, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\PhotoComposer.png, @PATH@, , 1"
"c:\program files\blender foundation\blender\blender.exe, Blender, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\Blender.png, @PATH@, , 1"
"c:\users\administrateur\appdata\local\google\chrome\application\chrome.exe, Google Chrome, @PATH@UserIcon\48x48\????.png, @PATH@, , 1"
"d:\photosetup\photosetup.exe, PhotoSetup, C:\travail\sdk\template\GoldFish\XPAERO\OfTheBay\UserIcon\48x48\PhotoSetup.png, @PATH@, , 1"
'
'End of file.

...

« Last Edit: December 17, 2008, 08:11:30 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
"Of The Bay" and 64-bit OS
« Reply #57 on: January 10, 2009, 01:40:55 PM »
You are advised that because the current version of "Of The Bay" is being written in 32-bit, it can't be used with VISTA 64-bit.

...
« Last Edit: January 10, 2009, 04:09:06 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: "Of The Bay"
« Reply #58 on: January 13, 2009, 01:35:10 PM »
I am looking for volunteer(s) using a Windows 64-bit and wanting to check a dedicated version of OfTheBay ?

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: "Of The Bay"
« Reply #59 on: January 19, 2009, 05:48:57 PM »
I have a new version of "Of The Bay" running on both 32 and 64-bit OS.

This version allows you to define the icon order, from the OTB file.

If interrested, then let me know.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com