Add another column

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Jan 2022, 04:17

Hi guys. Yes I am still here. Haven't been able to get to check script yet. Stuck at work here in Nova Scotia. Blizzard situation. Check when I'm able. Cheer's. Tk's again for all your help.
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 29 Jan 2022, 08:12

stormy weather here ... Canada / Nova Scotia / Halifax -5 C ... also New York / Washington ( ? )
https://www.timeanddate.com/weather/canada/halifax
https://earth.nullschool.net/#current/wind/surface/level/orthographic=-90.73,40.65,1821/loc=124.879,13.692

we had CFN ( Canadian Forces Network ) in South-Germany / Lahr 1967-1994 , I liked to record songs from radio with tape recorder ...

---------------------
https://www.youtube.com/watch?v=9qu4el_mk38
-- Jim Reeves - The Blizzard (HD)(with lyrics)
------------------
https://www.youtube.com/watch?v=A4dmfSK33c8
-- George Hamilton IV - Canadian Pacific
------------------
https://www.youtube.com/watch?v=-bOgkDCfa8Y
-- George Hamilton IV - My Nova Scotia Home
------------------
https://www.youtube.com/watch?v=IQpP2oe5DPQ
-- Diane Leigh - Canadian Pacific
------------------
https://en.wikipedia.org/wiki/Canadian_Forces_Radio_and_Television
-- Canadian Forces Radio and Television - Wikipedia
------------------

now at swiss television : Swissair flight 111 ( 20220130 )
---------------------
https://globalnews.ca/news/4417373/swissair-flight-111-overview/ 20180830
-- The night 229 people lost their lives on Swissair Flight 111 | Globalnews.ca
On Sept. 2, 1998, 229 people boarded Swissair Flight 111 at JFK International Airport in New York for a flight heading to Geneva, Switzerland.
By this time Flight 111 was less than 90 kilometres south of Halifax, just off the coast of Nova Scotia.
229 lives lost in a single instant; when a giant of the skies tumbled into the ocean near Nova Scotia’s iconic Peggy’s Cove.
---------------------
Last edited by garry on 30 Jan 2022, 15:13, edited 2 times in total.
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Jan 2022, 08:19

Halifax Nova Scotia. Stanfield Airport
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Jan 2022, 08:20

New York got same storm
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Jan 2022, 16:40

Alright.Here we go.
@garry Example 1 is a bit transparent but the background is still black.
@amateur+,@garry . Example 2 is good except it makes entire window transparent.Not just the background. Fun to have when I want everything transparent.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 29 Jan 2022, 17:17

Here is garry's example with transparent background only:

Code: Select all

;- Add another column - Page 4 
;- https://www.autohotkey.com/boards/viewtopic.php?p=441845#p441845
;-
;-- Date-modified =20220130     GUI background transparent
;-- Date-modified =20220128     GUI transparent
;-- Date-modified =20211107     not needed add # for title,Font/Color definitions are in column3 
;-- Date-modified =20211106     different fonts and size for buttons
;-- Date-modified =20211104/3   different colors for BUTTONS after TITLE or SPACE 
;-- Date-modified =20210917/3   csv Halifax / TITLE-button has another color / +Resize 
;-- Date-modified =20210917/2   add TITLE or SPACE between buttons
;-- Date-modified =20210915     color buttons
;-- Date-modified =20210914     one button starts 3 URL's or programs 
;--------------------------------------------------------------------------------
#warn
#NoEnv
#Singleinstance,force
filename1:="Jr's Shortcut's"
setworkingdir,%a_scriptdir%
Settitlematchmode,2
Gui,2:default
Gui,2: -DPIScale +Resize +Hwnduid
transform,s,chr,127    ;- delimiter for stringsplit
WA:=A_screenwidth,HA:=A_screenheight,xx:=100
color_to_make_invisible := 123456
Gui,2:Color, % color_to_make_invisible, Black   ;-blue/black

;Gui,2:Color,Black,Black
;--------------------
col1:="",col2:="",col3:="",col4:=""
vert:=18                    ;-- change here how many vertikal buttons want have ( inclusive EMPTY-LINE and TITLE )
;                           but then also change GuiSize ( Width and Height )                           
;--------------------
;-
;- I don't know which is the best font-size depending screen-size or scaling 
;------ BUTTON-TITLE ---------------
FontTitle:="Trebuchet MS" ,SizeTitle:="16 norm bold",colbgr:="Teal",coltxt:="Yellow"
;----------------------------------
;---------------------  Button-NAME - URL1 - URL2 - URL3 ----------------------------------------------------
;- if Column-2 is empty :
;- Halifax_Retales;;17 norm|Trebuchet MS|B7E5B0|Black;   ;<<< example FONT/colors after TITLE      ,Column-2 is empty, all definitions are in Column-3  : FontSize|FONT|BackGroundColor|TextColor
;-
;- _S;;17 bold|Verdana|gray|yellow;                      ;<<< example FONT/colors after EMPTY-LINE
;- TV_Guide;https://www.tvtv.ca/ns/halifax/lu4663D;;     ;- don't forget to add here 2 commas because only one URL
;-
;- TOOLS;;11 norm|Verdana|D5D1C9|black;
;- CHARMAP_CALC_NOTEPAD;charmap;calc;notepad             ;-- run URL or program (1-3)
;------------------------------------------------------------------------------------------------------------
;-
sectx=   
(Ltrim comments Join`r`n % 
Halifax_Retales;;12 Bold|Verdana|B7E5B0|Black;
Halifax_Retales_Chat;https://www.facebook.com/groups/HalifaxReTalesChat/?fref=mentions;;
Halifax_Retales_Facebook;https://www.facebook.com/HalifaxReTales;;
Halifax_Retales_Faves;https://faves.retales.ca/;;
Halifax_Retales_Twitter;https://twitter.com/HalifaxReTales;;
_S;12 Bold|Verdana;Blue;Black
Halifax_Peninsula;https://skyscraperpage.com/forum/forumdisplay.php?f=223;;
_S;;;
Utilities;;13 Bold|Verdana|C8D0D4|Black;
Bell_Aliant;https://mybell.bell.ca/Login?TYPE=33554433&REALMOID=06-000db269-81bc-1874-88d4-791a8e75d0dd&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=-SM-QKP7nnHXh2qXJfMWInHziJlTBdI9C7eOEOJRmIO63Oa%2fimktrTgbipB8hCBdh8Ey&TARGET=-SM-HTTPS%3a%2f%2fmybell%2ebell%2eca%2fMobility%3fAcctNo%3d8D711C5DA4B3704F0A5FE8ED0DB141225B124765045364C13F3345E0CA9697EBA72FAFBE86087BF101511830FD449071%26SubNo%3d13180274;;
NS_Power;https://myaccount.nspower.ca/;;
Revenue_Canada;https://cms-sgj.cra-arc.gc.ca/gol-ged/awsc/cms/login?TYPE=33554432&REALMOID=06-26a97681-2e5a-105d-9505-84cb2b4afb5e&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=-SM-GgEvYn3OZXQNOspDHK1HhUDfU85UA5Hn6uCn82KAPP5ZRYxHSPl9zbYgX%2bo%2fKX8ekTfnHiefEV9WuLhWoiWhmWgZUuDe6Y0zIdGX7J%2biBrvr%2fcy6jEzpUhFtfkK6Yo8B&TARGET=-SM-HTTPS%3a%2f%2fcms--sgj%2ecra--arc%2egc%2eca%2fgol--ged%2fawsc%2fcms%2fmacauth%3fTYPE%3d33554432%26REALMOID%3d06--00ba5d0a--2e5a--105d--9505--84cb2b4afb5e%26GUID%3d%26SMAUTHREASON%3d0%26METHOD%3dGET%26SMAGENTNAME%3d--SM--GgEvYn3OZXQNOspDHK1HhUDfU85UA5Hn6uCn82KAPP5ZRYxHSPl9zbYgX-%2bo-%2fKX8ekTfnHiefEV9WuLhWoiWhmWgZUuDe6Y0zIdGX7J-%2biBrvr-%2fcy6jEzpUhFtfkK6Yo8B%26TARGET%3d--SM--HTTPS-%3a-%2f-%2fcms----sgj-%2ecra----arc-%2egc-%2eca-%2fgol----ged-%2fawsc-%2fcms-%2fpostlogin-%3fSAMLRequest-%3dfVCxboMwEN3zFcg7GJsawgmQImWJlC5t1aFLdXEs4ghs6jNKP7---%2BEDm2X3nDD07t3771mN8eLezIfs6GY7JdlHUbrXcsuMU4EnOuRUuqvmQ6YYtBZrzONd---%2FRGfJpPg9WccBwkkWfJYd---%2Byd1WYrarqqjZVqUp1lltVFDpHVZ---%2Brh6qUUp3MQiWazcFRRBdbJnMpUiHSvHiRAkQJon5jyasJtJqRWc6Sz3Fw1LI5OPBIlsDhaAiihufd4xEWDkzBR6---%2F9wLpNskzjSMD6KHxfwwL8r4BEJtwbYN3ge---%2BsyXPPj3---%2FwN---%2F1HuNg3---%2FXWP3BQ---%3D---%3D-%26RelayState-%3dac0922f7e6f35cdaa2770815347a7f9b9e57e960-%26SigAlg-%3dhttp---%3A---%2F---%2Fwww-%2ew3-%2eorg---%2F2001---%2F04---%2Fxmldsig----more---%23rsa----sha256-%26Signature-%3dXpv3M3aTaIDMkv---%2FbtxIVHkf6HZ9xjEVFvwwLv04---%2FywTRliKa2H---%2B8IpSAnvLVp0ZduiXVpwZp0V9---%2FpSxnMaF0fH---%2BstWQutSK9DYJNchp---%2B---%2ByjlnAFhfAS0LKzpTvIU7nsewuOMyMnJxGZlx5buBAUhg8HczSK3Z0xQpMGKTXBzXy8SXxwc1BPnpal---%2BGPUVlahYEtdiDFJJDw52BYYbgGbWa---%2F31A5erC6DLfEfr6a0A5GXipKMh47kd3aC1BrGC4Nk---%2Fud6AeesmzgBuf1MoJ---%2B0DXAg48Suuz8qgxdMy9l3nzvlk57---%2FZJrUHU3YRF77nr2pYTnm8UYRdsLZsx---%2FVoVWTi0g---%3D---%3D-%26SMPORTALURL-%3d3s3oC2jIJ0qEQ12Yiq9kAEjDKEUuKufwTJYavzvDtmH65tOSqAjOcKBbNnWrHFISoEmNt55oyAIlNgDZ---%2FeXB9Z---%2Fegu2zyozy;;
Tim_Hortons;https://www.timhortons.ca/;;
Tools;;
This_PC;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\PC Tool's\This PC.ahk;;
_S;;;
_S;;15 Bold|Verdana|Green|Black;
TD_Bank;https://authentication.td.com/uap-ui/index.html?consumer=easyweb&locale=en_CA#/login/easyweb-getting-started;;
Programs;;13 Bold|Verdana|FF8000|Black;
AutoHotkey_A;A:\
CCleaner_Portable;E:\PortableApps\PortableApps\ccPortable\ccPortable.exe;;
Equalizer_APO;C:\Users\Jr\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Equalizer APO 1.2.1\Configuration Editor.lnk;;
Microsoft_Config_Center;C:\Program Files\Microsoft Mouse and Keyboard Center\MouseKeyboardCenter.exe;;
Revo_Uninstaller;E:\PortableApps\PortableApps\RevoUninstallerPortable\RevoUninstallerPortable.exe;;
Portable_Apps;E:\PortableApps\Start.exe - Shortcut.lnk;;
Sandisk_E;E:\;;
System_Explorer;E:\PortableApps\PortableApps\SystemExplorerPortable\SystemExplorerPortable.exe;;
_S;;;
Shopping;;13 Italic|Verdana|FF8000|Black;
Amazon_Canada;https://www.amazon.ca/;;
Amazon_Canada_Phone;https://gethuman.com/phone-number/Amazon-Canada;;
Costco_Canada;https://www.costco.ca/?langId=-24;;
Walmart_Canada;https://www.walmart.ca/en;;
_S;;;
_S;;;
_S;;;
Sports;;14 Bold|Verdana|B7E5B0|Black;
Sportsnet;https://www.sportsnet.ca/;;
TSN;https://www.tsn.ca/live/schedule;;
ESPN;https://www.espn.com/;;
_S;;;
_S;;;
_S;;;
_S;;;
Transportation;;13 Bold|Verdana|C8D0D4|Black;
Halifax_Transit;https://www.halifax.ca/;;
Halifax_Transit_Alerts;https://www.halifax.ca/transportation/halifax-transit/service-disruptions?utm_source=citynews%20halifax&utm_campaign=citynews%20halifax%3A%20outbound&utm_medium=referral;;
Halifax_Transit_Twitter;https://twitter.com/hfxtransit;;
Stanfield_Airport;;13 Bold|Verdana|Silver|Black;;
Halifax_Airport;https://halifaxstanfield.ca/flight-information/departures/;;
Halifax_Airport_Twitter;https://twitter.com/HfxStanfield;;
_S;;;
_S;;14 Bold|Verdana|Green|Black;
Calendar;C:\Users\Jr\AppData\Roaming\Microsoft\Windows\Network Shortcuts\Shortcuts\Calendar - Shortcut.lnk;;
GMail;;13 Bold|Verdana|FF8000|Black;
GMail_Login;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Gmail Login.ahk;;
GMail_Logout;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Gmail Logout.ahk;;
GMail_Relogin;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Gmail Relogin.ahk;;
News;;13 Bold|Verdana|00FFFF|Black;
Chronicle_Herald;https://www.thechronicleherald.ca/;;
Global_News;https://globalnews.ca/halifax/;;
CityNews_Everywhere;https://www.halifaxtoday.ca/;;
NY_Post;https://nypost.com/;;
Las_Vegas_Sun;https://lasvegassun.com/;;
CNN_News;https://www.cnn.com/;;
Favorites;;13 Bold|Verdana|FF8000|Black;
Firefox_Portable;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Firefox Portable.ahk;;
Brave_Portable;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Brave Portable.ahk;;
Your_Phone;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Your Phone.ahk;;
TV_Show_Tracker;C:\Users\Jr\Desktop\Send_2TVShowTracker.ahkC038;;
_S;;;
_S;;;
AutoHotkey_Shortcuts;;12 Bold|Verdana|B7E5B0|Black;
AHK_Scripts;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts;;
AHK_Task_Manager;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\AHK Tool's\Ahk Task Manager.ahk;;
Forums;https://www.autohotkey.com/boards/viewforum.php?f=4&sid=e5b0a65879e2859a80dd02103f5b3813;;
Script_Editor;E:\PortableApps\PortableApps\AutoHotkeyPortable\AHK Scripts\Notepad++Portable.ahk;;
_S;;;
_S;;;
Weather;;12 Bold|Verdana|C8D0D4|Black;
Weather_Network;https://www.theweathernetwork.com/ca/weather/nova-scotia/halifax;;
National_Hurricane_Center;https://www.nhc.noaa.gov/?atl;;
Canada_Hurricane_Center;https://weather.gc.ca/hurricane/track_e.html;;
_S;;;
_S;;;
_S;;;
_S;;;
_S;;;
_S;;14 Bold|Verdana|Green|Black;
TV_Guide;https://www.tvtv.ca/ns/halifax/lu4663D;;
)
;---------------------
loop,parse,sectx,`n,`r
  {
  x:=a_loopfield
  if x=
     break
  stringsplit,k,x,`;
  col1 .= k1 . s ,  col2 .= k2 . s ,  col3 .= k3 . s ,  col4 .= k4 . s
  }
stringsplit,q,col1,%s%
stringsplit,m,col2,%s%
stringsplit,n,col3,%s%
stringsplit,o,col4,%s%
;-----------------------
i:=0,totx:=(q0-1),x:= (wa*1)/xx ,y:= (ha*1)/xx,  w:= (wa*13 )/xx,h:= (ha*2.5)/xx,v:=(ha*3)/xx        ;- button x y w h v=distance vertical
;------------------------------
Loop,%totx%
  {
  i++
  BTName := q%i%
  column2:= m%i%
  if (btname="_S")
    {
    Gui,2:Add,Text,            x%x%   y%y% w%w%  h%h% center,                               ;- if space added
    column3:= n%i%,    column4:= o%i%
    stringsplit,z,column3,`|
    }
  ;-----------------
  else if (column2="" and btname !="_S")                                                    ;- add title and background-colorRED and text-colorWHITE
    {
      {
      Gui,2:font,s%SizeTitle% ,%FontTitle%
      Gui,2:Add,Progress,        x%x%   y%y% w%w%  h%h%  Disabled Background%colbgr%       ;- TITLE Button-backgroundcolor
      Gui,2:Add,Text,            xp    yp     wp    hp   c%coltxt%  BackgroundTrans Center 0x200 gStart1 v%btname%_%i% ,%btname%
      column3:= n%i% ,      column4:= o%i%
      stringsplit,z,column3,`|
      }
    }
  else
    {
    ;---------------------------
    ;- after TITLE or SPACE > other buttons color background and text
    ;---
    Gui,2:font,s%z1%,%z2%
    Gui,2:Add,Progress,            x%x%   y%y% w%w%  h%h%  Disabled Background%Z3%
    Gui,2:Add,Text,                xp    yp     wp    hp   c%Z4%  BackgroundTrans Center 0x200 gStart1 v%btname%_%i% ,%btname%
  ;---------------------------
  }
  y+=%v%
  Md:=mod(i,vert)
  if md=0
     x+=(wa*14)/xx,y:=(ha*1)/xx   ;- if modulo = 0 them move to new x (right)  y (top)
  }
;--------- GUISIZE -------------------------------------------------------
x:=(wa*17)/xx,y:=(ha*20)/xx,w:=(wa*71)/xx,h:=(ha*55)/xx   ;- GUI x y w h
Gui,2:Show, x%x% y%y% h%h% w%w%,%filename1%
WinSet, TransColor, % color_to_make_invisible, ahk_id %uid%
Return
;-------------------------------------------------------------------------
2Guiclose:
exitapp
;-------------------------------------------------------------------------
esc::exitapp
;--------------- start --------------------------
start1:
gui,2:submit,nohide
Mousegetpos,,,,Ctrl       ;- Button1
r:= a_guicontrol          ;- vVar ( Buttonname )
stringtrimleft,ct,ctrl,6  ;- Button-(1)
clm2:= m%ct%,clm3:= n%ct%,clm4:= o%ct%
;msgbox, 262208, ,R=%r%`nCT=%ct%`nCTRL=%ctrl%`nURL1=%clm2%`nURL2=%clm3%`nURL3=%clm4%
try
 run,%clm2%
catch,err 
 gosub,checkerror
try
 run,%clm3%
catch,err 
 gosub,checkerror
try
 run,%clm4%
catch,err 
 gosub,checkerror
return
Checkerror:
    x1:="Message=" . err.Message
    x2:="Extra  =" . err.extra
    x3:="File   =" . err.file
    x4:="Line   =" . err.line
    x5:="What   =" . err.what
    msgbox, 262208,ERROR,Error=`n%x1%`n----------------------`n%x2%`n%x3%`n%x4%`n%x5%`n--------------------`n
return
Last edited by amateur+ on 30 Jan 2022, 16:14, edited 2 times in total.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Jan 2022, 17:30

@amateur+.That is perfect.Thank you. Although I kind of liked your Accessory(Toy).Might be handy.
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 30 Jan 2022, 13:09

@amateur+ thank you , works fine , nice color = 123456 :)
just remove '[ Set transparency with buttons alt+up/down ]' in Gui-name ( variable filename1 )
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 30 Jan 2022, 14:24

@garry, it is better for you to post a script with all things needed (update version, for example) and I'll delete my post then.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 30 Jan 2022, 14:48

Is there a way to make the background completely transparent instead of black?
@jrachr asked for small details ( or can ask again ) , last detail was for transparent GUI-BACKGROUND which you've solved
I made a failure , I made GUI transparent ( change GUI transparency with up/down buttons )
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 30 Jan 2022, 14:57

@amateur+. What you posted is fine amateur+. Garry doesn't need to repost the same script that you made work to my needs. If changes are needed or requests asked we have it here under my initial request to Garry. Thank you very much both for your help. Cheer's.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 30 Jan 2022, 15:13

I've just added a couple of simple lines, but ok...
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 30 Jan 2022, 15:25

Thank you all.
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 30 Jan 2022, 16:03

I just realised that the buttons at last line not worked : TD_Bank/Calendar/TV-GUIDE ( if GUI-BACKGROUND transparent )
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 30 Jan 2022, 16:21

@garry. I'm guessing that's not a good thing? Is that fixable?
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 30 Jan 2022, 16:46

@garry. Could it possibly be background color I have of button? They are all the same color aren't they? Sorry. Not home at the moment.
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 30 Jan 2022, 17:02

sorry I must go back to roots ... have no time now ...
here added to this older script ( page-3 ) transcolor ( from user amateur+ )
posting.php?mode=edit&f=76&p=428455
must change problem in variable 'sectx'
... yes and least I should delete all my scripts if everything OK ....

Code: Select all

;- here added to this older script transcolor ( from user amateur+ )
;-https://www.autohotkey.com/boards/posting.php?mode=edit&f=76&p=428455
;-------- saved at 星期六 十一月 2021-11-06  17:03 UTC --------------
;- Add another column - Page 3 
;- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=94674&start=40
;-- Date-modified =20211106     different fonts and size for buttons / TITLE begins with '#'
;-- Date-modified =20211104/3   different colors for BUTTONS after TITLE or SPACE 
;-- Date-modified =20210917/3   csv Halifax / TITLE-button has another color / +Resize 
;-- Date-modified =20210917/2   add TITLE or SPACE between buttons
;-- Date-modified =20210915     color buttons
;-- Date-modified =20210914     one button starts 3 URL's or programs 
;--
#warn
#NoEnv
#Singleinstance,force
name1=TEST COLOR BUTTONS
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: -DPIScale +Resize +Hwnduid
transform,s,chr,127    ;- delimiter for stringsplit
WA:=A_screenwidth,HA:=A_screenheight,xx:=100
;Gui,2:Color,C8D0D4,Black                  ;-gray
Gui,2:Color,FF00FF,
;--------------------
col1:="",col2:="",col3:="",col4:=""
vert:=13                    ;-- change here how many vertikal buttons want have ( inclusive SPACE and #TITLE )
;                           but then also change GuiSize ( Width and Height )                           
;--------------------
;-
;- I don't know which is the best font-size depending screen-size or scaling 
;------ BUTTON-TITLE ---------------
;-- maybe change FONT and FONTSIZE
FontTitle:="Trebuchet MS"
SizeTitle:="16 norm bold"          
colbgr:="red"
coltxt:="white"
;----------------------------------
;---------------------  NAME - URL1 - URL2 - URL3 ----------------------------------------------------
;-  BUTTONS :   if  _S (empty place)  or  #TITLE   => change BUTTON-BackgroundColor and Textcolor and Color/Size/Font -------------
;-  note : if after _S (empty place)  no  #TITLE then must Color/Size/Font be defined
;-
;- examples :
;- #Weather;13 italic|Arial       ;F7B900;Black      > followed buttons after TITLE        > size=13 italic Font=Arial      Button-Background=F7B900   Text=Black
;- #News   ;13 norm  |Trebuchet MS;YELLOW;Black      > followed buttons after TITLE        > size=13 norm   Font=Trebuchet  Button-Background=Yellow   Text=Black
;- _S      ;17 bold  |Verdana     ;Gray  ;Yellow     > followed buttons after empty TEXT   > size=17 bold   Font=Verdana    Button-Background=Gray     Text=Yellow
;-
;-
sectx=   
(Ltrim comments Join`r`n % 
#Halifax_Retales;17 norm|Trebuchet MS;B7E5B0;Black
Halifax_Retales_Facebook;https://www.facebook.com/HalifaxReTales;;
Halifax_Retales_Chat;https://www.facebook.com/groups/HalifaxReTalesChat/?fref=mentions;;
Halifax_Retales_Twitter;https://twitter.com/HalifaxReTales;;
_S;;;
#Weather;13 italic|Arial;F7B900;black
Weather_Network;https://www.theweathernetwork.com/ca/weather/nova-scotia/halifax;;
National_Hurricane_Center;https://www.nhc.noaa.gov/?atl;;
Canada_Hurricane_Center;https://weather.gc.ca/hurricane/track_e.html;;
_S;;;
#Utilities;17 norm|Verdana;C8D0D4;Black
Bell_Aliant;https://mybell.bell.ca/Login?TYPE=33554433&REALMOID=06-000db269-81bc-1874-88d4-791a8e75d0dd&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=-SM-QKP7nnHXh2qXJfMWInHziJlTBdI9C7eOEOJRmIO63Oa%2fimktrTgbipB8hCBdh8Ey&TARGET=-SM-HTTPS%3a%2f%2fmybell%2ebell%2eca%2fMobility%3fAcctNo%3d8D711C5DA4B3704F0A5FE8ED0DB141225B124765045364C13F3345E0CA9697EBA72FAFBE86087BF101511830FD449071%26SubNo%3d13180274;;
NS_Power;https://myaccount.nspower.ca/;;
#News;13 norm|Trebuchet MS;YELLOW;Black
Chronicle_Herald;https://www.thechronicleherald.ca/;;
Global_News;https://globalnews.ca/halifax/;;
Halifax_Today;https://www.halifaxtoday.ca/;;
NY_Post;https://nypost.com/;;
Las_Vegas_Sun;https://lasvegassun.com/;;
CNN_News;https://www.cnn.com/;;
_S;17 bold|Verdana;gray;yellow
TV_Guide;https://www.tvtv.ca/ns/halifax/lu4663D;;
TD_Bank;https://authentication.td.com/uap-ui/index.html?consumer=easyweb&locale=en_CA#/login/easyweb-getting-started;;
_S;13 italic|Trebuchet MS;1000B5;white
Amazon_Canada;https://www.amazon.ca/;;
Amazon_Canada_Phone;https://gethuman.com/phone-number/Amazon-Canada;;
#Sports;17 norm|Verdana;CBA06A;Black
Sportsnet;https://www.sportsnet.ca/;;
ESPN;https://www.espn.com/;;
Halifax_Airport;https://halifaxstanfield.ca/;;
_S;13 italic|Trebuchet MS;green;white
Halifax_Airport_Twitter;https://twitter.com/HfxStanfield;;
_S;;;
#TOOLS;11 norm|Verdana;D5D1C9;black
CHARMAP_CALC_NOTEPAD;charmap;calc;notepad
Windows_RECOVERY;rstrui;;
)
;---------------------
loop,parse,sectx,`n,`r
  {
  x:=a_loopfield
  if x=
     break
  stringsplit,k,x,`;
  col1 .= k1 . s
  col2 .= k2 . s
  col3 .= k3 . s
  col4 .= k4 . s
  }
stringsplit,q,col1,%s%
stringsplit,m,col2,%s%
stringsplit,n,col3,%s%
stringsplit,o,col4,%s%
;-----------------------
totx:=(q0-1)
x:= (wa*1)/xx ,y:= (ha*1)/xx,  w:= (wa*13 )/xx,h:= (ha*2.5)/xx,v:=(ha*3)/xx        ;- button x y w h v=distance vertical
i=0
;------------------------------
Loop,%totx%
  {
  i++
  BTName := q%i%
  column2:= m%i%
  stringmid,BTN,BTName,1,1
  if (btname="_S")
    {
    Gui,2:Add,Text,            x%x%   y%y% w%w%  h%h% center,                               ;- if space added
    column2:=m%i%
    stringsplit,z,column2,`|
    column3:= n%i%
    column4:= o%i%
    }
  ;-----------------
  else if (BTN="#")
    {
      {
      Gui,2:font,s%SizeTitle% ,%FontTitle%
      Gui,2:Add,Progress,        x%x%   y%y% w%w%  h%h%  Disabled Background%colbgr%       ;- TITLE Button-backgroundcolor
      Gui,2:Add,Text,            xp    yp     wp    hp   c%coltxt%  BackgroundTrans Center 0x200 gStart1 v%btname%_%i% ,%btname%
      column2:=m%i%
      stringsplit,z,column2,`|
      column3:= n%i%
      column4:= o%i%
      }
    }
  else
    {
    ;---------------------------
    ;- after TITLE or SPACE > other buttons color background and text
    ;---
    Gui,2:font,s%z1%,%z2%
    Gui,2:Add,Progress,            x%x%   y%y% w%w%  h%h%  Disabled Background%column3%
    Gui,2:Add,Text,                xp    yp     wp    hp   c%column4%  BackgroundTrans Center 0x200 gStart1 v%btname%_%i% ,%btname%
  ;---------------------------
  }
  y+=%v%
  Md:=mod(i,vert)
  if md=0
     x+=(wa*14)/xx,y:=(ha*1)/xx   ;- if modulo = 0 them move to new x (right)  y (top)
  }
;--------- GUISIZE -------------------------------------------------------
x:=(wa*.25)/xx,y:=(ha*.30)/xx,w:=(wa*43)/xx,h:=(ha*41)/xx   ;- GUI x y w h
Gui,2:Show, x%x% y%y% h%h% w%w%,%name1%
WinSet, TransColor,FF00FF, ahk_id %uid%
return
;-------------------------------------------------------------------------
2Guiclose:
exitapp
;-------------------------------------------------------------------------
;--------------- start --------------------------
start1:
gui,2:submit,nohide
Mousegetpos,,,,Ctrl       ;- Button1
r:= a_guicontrol          ;- vVar ( Buttonname )
stringmid,btnx,r,1,1
if (btnx="#")
    return
stringtrimleft,ct,ctrl,6  ;- Button-(1)
clm2:= m%ct%
clm3:= n%ct%
clm4:= o%ct%
;msgbox, 262208, ,R=%r%`nCT=%ct%`nCTRL=%ctrl%`nURL1=%clm2%`nURL2=%clm3%`nURL3=%clm4%
try
 run,%clm2%
try
 run,%clm3%
try
 run,%clm4%
Gui,2:minimize
return
;=================== END SCRIPT =============================================
;esc::exitapp
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 30 Jan 2022, 17:09

@garry. Understood. Thank you.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 30 Jan 2022, 18:27

garry wrote:
30 Jan 2022, 16:03
I just realised that the buttons at last line not worked : TD_Bank/Calendar/TV-GUIDE ( if GUI-BACKGROUND transparent )
You need to click on the bottom part of these buttons (TD_Bank, Calendar, TV_Guide) to make them work. Strange bug.
here added to this older script ( page-3 ) transcolor
Here is that bug too. With airport twitter button.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
jrachr
Posts: 545
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 31 Jan 2022, 11:04

@garry. By all means remove previous scripts as everything you did so far is working like a charm.

@amateur+. Even pressing around the bottom I cannot get (TD_Bank, Calendar, TV_Guide) to work on my PC. How ever my airport twitter works fine.

I have gone as far as changing colors, relocating the buttons. Even disabling everything except (TD_Bank, Calendar, TV_Guide) but still nothing. Bizarre.
Post Reply

Return to “Ask for Help (v1)”