Add another column

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

Re: Add another column

Post by jrachr » 26 Dec 2021, 15:59

@garry. Thank you for your help.

jrachr
Posts: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 28 Dec 2021, 18:05

@garry. Hi Garry. Yes I'm back. I must be real stupid or I am missing something. Here is what I am trying to add to my current script but I can not get to work. Can you tell me why? The #Tab key is actually my taskview key and the sc038 is my Skype key. Are you able to help?

Firefox_Portable;#{Tab}
Your_Phone;Send {RAlt};;
TV_Show_Tracker;Send, SC038

garry
Posts: 3738
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 29 Dec 2021, 07:59

at page-3 I've modified the last script , create 3 small ahk-scripts to the last buttons
( first example should work , Send_2Firefox_TAB.ahk )

you can't run ahk commands with button, must add an ahk-script
with a button you can run programs or url ( total 3 )
example :
BUTTON-NAME;program;url1;url2

jrachr
Posts: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Dec 2021, 10:54

Code: Select all

;- Add another column - Page 3 
;- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=94674&start=40

;-- 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
name1=Jr's Shortcut's
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: -DPIScale +Resize
transform,s,chr,127    ;- delimiter for stringsplit
WA:=A_screenwidth,HA:=A_screenheight,xx:=100
;Gui,2:Color,C8D0D4,Black                  ;-gray
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;;
;-
;- 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%,%name1%
Return
;-------------------------------------------------------------------------
2Guiclose:
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%
try
 run,%clm3%
try
 run,%clm4%
Gui,2:
exitapp
return
;=================== END SCRIPT =============================================
@garry. At least I am trying. So here is where I am at. When I press the #Tab(Taskview) It works fine on my keyboard. But when I use the ahk you sent It just sends regular taskview. I was able to fix this by making an if Winexist script for my firefox as well as my Brave browser. My trouble now is I cannot get 2 of my Window apps to work. The Skype key(key SC038) which is My TV Show Tracker and My right Alt which is the Your Phone app. They both work fine on my keyboard but can't get them to work on your guide. Obvoiusly doing something wrong. Tried to make an if winexist script for Show Tracker as well as Your phone but neither worked. I am still trying but can't find path to these apps.

garry
Posts: 3738
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 29 Dec 2021, 12:52

check the fullpath from your programs , should be > E:\.... program_name.exe ( Button-name;Fullpath;; )
you start a program with extension ahk ( instead of exe )
my idea was to add some small ahk-scripts and click button if want send something or use a hotkey inside the script
( a small Test-GUI below )

Code: Select all

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
here only a test-script, maybe someone can help
contains 3 Hotkey and 3 buttons to start 3 ahk-script
( F7 , test with FireFox was ok )

Code: Select all

/*
When I press the #Tab(Taskview) It works fine on my keyboard. 
But when I use the ahk you sent It just sends regular taskview. 
I was able to fix this by making an if Winexist script for my firefox as well as my Brave browser. 
;--------
My trouble now is I cannot get 2 of my Window apps to work.
The Skype key(key SC038) which is My TV Show Tracker and 
My right Alt which is the Your Phone app. 
They both work fine on my keyboard but can't get them to work on your guide. 
Obvoiusly doing something wrong. 
;-----------
Tried to make an if winexist script for Show Tracker as well as Your phone but neither worked. 
I am still trying but can't find path to these apps.
;-----------
*/

#Warn
Setworkingdir,%a_scriptdir%
Settitlematchmode,2
Name1=TEST1   F7=Send2FF_#Tab    F8=Send_WinX     F9=Send_WinR
Gui,2:default
Gui,2: +Alwaysontop
Gui,2: add,button,x20 y10   w200 h30 gA1 ,F7_Send2FF_#Tab
Gui,2: add,button,x20 y60   w200 h30 gA2 ,F8_Send_WinX
Gui,2: add,button,x20 y110  w200 h30 gA3 ,F9_Send_WinR
;-------------------- a hotkey for test ----------------
hotkey, IfWinActive,TEST1 ahk_class AutoHotkeyGUI   ;- part of this script-name see var=%name1%
hotkey, ~F7, send1                                  ;- send #{TAB} to FF
hotkey, ~F8, send2
hotkey, ~F9, send3
;-------------------
;-------- programs for test -------------------------------
Script1=%a_scriptdir%\Send_2Firefox_TAB.ahk
Script2=%a_scriptdir%\Send_2Your_Phone_RAlt.ahk
Script3=%a_scriptdir%\Send_2TVShowTracker.ahk
;-------
sc:="ahk_exe firefox.exe"
Gosub,testfiles                                  ;- create 3 small ahk-scripts
Gui,2: show,x100 y100 w600 h200,%name1%
return
;---------
2Guiclose:
Exitapp
;-------------------------------------------------------------------------
send1:
#IfWinExist,("ahk_class MozillaWindowClass")
IfWinNotActive ,%sc%,,WinActivate,%sc%
      WinWaitActive,%sc%
send,#{tab}     ;- F7 to FF
#IfWinExist
return
;------------------
send2:
send,#x
;Send,{RAlt}    ;- F8  YourPhone   ( modify this )
return
;------------------
send3:
send,#r
;Send,SC038     ;- F9  The Skype key (key SC038) which is My TV Show Tracker  ( modify this )
return
;------------------
A1:
run,%script1%
return
A2:
run,%script2%
return
A3:
run,%script3%
return
;==========================================
Testfiles:
ifnotexist,%script1%
 {
 ex1=
 (Ltrim,join`r`n
  #IfWinExist,("ahk_class MozillaWindowClass")
  IfWinNotActive ,%sc%,,WinActivate,%sc%
      WinWaitActive,%sc%
  sleep,500
  ;ControlSend,ahk_parent,#{Tab},%sc%
  send,#{tab}
  #IfWinExist
  return
 )
 fileappend,%ex1%`r`n,%script1%,utf-8
 ex1=
 }
;-------
ifnotexist,%script2%
 {
 ex2=
 (
 sleep,500
 ;Send,{RAlt}    ;- YourPhone  ( modify this )
 send,#x
 return
 )
 fileappend,%ex2%`r`n,%script2%,utf-8
 ex2=
 }
;-------
ifnotexist,%script3%
 {
 ex3=
 (
 sleep,500
 ;Send,SC038     ;- The Skype key(key SC038) which is My TV Show Tracker  ( modify this )
 send,#r
 return
 )
 fileappend,%ex3%`r`n,%script3%,utf-8
 ex3=
 }
return
;====================================================

jrachr
Posts: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 29 Dec 2021, 14:49

@garry. Thank you very much. Was able to get figured out. The 2 windows store apps TV Show Tracker and Your Phone are giving me a bit of a hard time. I think because they use the same class and host but I can deal with it. Cheer's

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 07 Jan 2022, 00:30

@jrachr, use this perfect (and free donationware) soft written on AutoHotkey:
Quick Access Popup
You will be able easily to add columns, linebreakers and so on.
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: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 22 Jan 2022, 07:02

@Amateur+ Thank you very much . Somehow I missed this. Will have a lok at it. Cheer's

jrachr
Posts: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 26 Jan 2022, 08:01

@garry. Hi garry. Just a curiosity question. I tried a couple of things that did not work so before I find out I can't I will ask. Is there a way to make the background completely transparent instead of black? I tried background trans and just transparent. Neither worked. So it might not be possible. Tk's.

garry
Posts: 3738
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 28 Jan 2022, 05:57

Example : Gui transparent
modified 1 line and added Winset after gui,show
Gui,2: -DPIScale +Resize Hwnduid
;- maybe change color here :
;Gui,2:Color,C8D0D4,Black ;-gray/black
after Gui,show > Winset,transparent
;Gui,2:Show, x%x% y%y% h%h% w%w%,%name1%
WinSet, Transparent, 150, ahk_id %uid%

Code: Select all

;- Add another column - Page 3 
;- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=94674&start=40
;-
;-- 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
name1=Jr's Shortcut's
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,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;;
;-
;- 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%,%name1%
WinSet, Transparent, 150, ahk_id %uid%
Return
;-------------------------------------------------------------------------
2Guiclose:
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

;=================== END SCRIPT =============================================
;esc::exitapp
2nd example : change transparency with buttons alt + up/down

Code: Select all

;- Add another column - Page 4 
;- https://www.autohotkey.com/boards/viewtopic.php?p=441845#p441845
;-
;-- 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  [ Set transparency with buttons alt+up/down ]"
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
Gui,2:Color,C8D0D4,Black                  ;-gray/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, Transparent, 150, ahk_id %uid%                ;- predefined transparency , use up/down buttom
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
;====================================
;- https://www.autohotkey.com/boards/viewtopic.php?p=311740&sid=1db352c1a5e3346257264a53c5411532#p311740
;- see also :
;- settitlematchmode,2
;- Gui,2: -DPIScale +Resize Hwnduid
#IfWinActive,Jr's Shortcut's ahk_class AutoHotkeyGUI            ;- <<< here at least a part from filename1 
!up::
WinGet, Trans,Transparent,% TraWin := "ahk_id " uid
If !Trans
	Return
Trans := (Trans = "") ? 255 : Trans + 16
If (Trans < 250)
	WinSet, Transparent, %Trans%,% TraWin
Else
{
	WinSet, Transparent, 255,% TraWin
	WinSet, TransColor, OFF,% TraWin
	WinSet, Transparent, OFF,% TraWin
}
Return
;------
!down::
WinGet, Trans,Transparent,% TraWin := "ahk_id " uid
Trans := (Trans = "") ? 239 : Max(15, Trans - 16)
WinSet, Transparent, %Trans%,% TraWin
Return
;=================================================================================
Last edited by garry on 28 Jan 2022, 13:46, edited 1 time in total.

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 28 Jan 2022, 09:31

And mini accessory for garry's example: a script that changes transparancy of the window under the mouse cursor via ^!+WheelDown and ^!+WheelUp or of the active window via ^!+Down and ^!+Up:

Code: Select all

+^!Up::
+^!Down::
+^!WheelUp::
+^!WheelDown::
SmoothTransparencyChange() {
	if (A_ThisHotkey ~= "Wheel")
	{	MouseGetPos,,, MouseWin
		WTitle := "ahk_id" . MouseWin
	}
	else WTitle := "A"
	WinGet, TransparentStatus, Transparent, % WTitle
	if (TransparentStatus = "")
		TransparentStatus := 255
	WinExist("A")
	WinSet, Transparent, % Max(15, Min(255, TransparentStatus + ((A_ThisHotkey ~= "Up") ? 15 : -15))), % WTitle
	if !WinActive()
		WinActivate
	Sleep 50
}
EDIT: Added ^!+WheelDown and ^!+WheelUp.
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.

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 28 Jan 2022, 11:30

Also added ^!+WheelDown and ^!+WheelUp.
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: 531
Joined: 01 Mar 2021, 17:33

Re: Add another column

Post by jrachr » 28 Jan 2022, 12:35

Thank you very much Garry and amateur+. I will try it out when I get home.

garry
Posts: 3738
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 28 Jan 2022, 13:49

@amateur+ thank you , works fine
added a second in example above with a script from @Rohwedder

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

Post by amateur+ » 28 Jan 2022, 14:16

(Trans = "") is useless if there is return above.
Spoiler
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.

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add another column

Post by gregster » 28 Jan 2022, 14:20

amateur+ wrote:
28 Jan 2022, 14:16
(Trans = "") is useless if there is return above.
Spoiler
But this looks like the return is only executed conditionally... so, no problem.

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

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

But the condition is linked with Trans value. If (Trans = "") we'll get immediate return.
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.

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add another column

Post by gregster » 28 Jan 2022, 14:28

Okay, so it might be redundant.

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Add another column

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

The 2nd garry's example he added recently: viewtopic.php?p=441805#p441805
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: 3738
Joined: 22 Dec 2013, 12:50

Re: Add another column

Post by garry » 29 Jan 2022, 02:13

script from @amateur+ works fine
I used/copied a script from @Rohwedder works for each active window with mouse alt + wheelup/wheeldown
viewtopic.php?p=311740&sid=1db352c1a5e3346257264a53c5411532#p311740

Code: Select all

;- Transparentes schmales Fenster als Leseleiste gewünscht 
;- https://www.autohotkey.com/boards/viewtopic.php?p=311740&sid=1db352c1a5e3346257264a53c5411532#p311740

!WheelUp::
MouseGetPos,,, Win
WinGet, Trans, Transparent,% TraWin := "ahk_id " Win
If !Trans
	Return
Trans := (Trans = "") ? 255 : Trans + 16
If (Trans < 250)
	WinSet, Transparent, %Trans%,% TraWin
Else
{
	WinSet, Transparent, 255,% TraWin
	WinSet, TransColor, OFF,% TraWin
	WinSet, Transparent, OFF,% TraWin
	WinSet, Redraw,, % TraWin
}
Return
;-----------------
!WheelDown::
MouseGetPos,,, Win
WinGet, Trans, Transparent,% TraWin := "ahk_id " Win
Trans := (Trans = "") ? 239 : Max(15, Trans - 16)
WinSet, Transparent, %Trans%,% TraWin
Return
esc::exitapp
I used like this : works only for this script ( alt + buttons up/down )
#IfWinActive,Jr's Shortcut's ahk_class AutoHotkeyGUI ;- <<< here at least a part from filename1
;....

Code: Select all

;- https://www.autohotkey.com/boards/viewtopic.php?p=311740&sid=1db352c1a5e3346257264a53c5411532#p311740
;- see also :
;- settitlematchmode,2
;- Gui,2: -DPIScale +Resize Hwnduid
#IfWinActive,Jr's Shortcut's ahk_class AutoHotkeyGUI            ;- <<< here at least a part from filename1 
!up::
WinGet, Trans,Transparent,% TraWin := "ahk_id " uid
If !Trans
	Return
Trans := (Trans = "") ? 255 : Trans + 16
If (Trans < 250)
	WinSet, Transparent, %Trans%,% TraWin
Else
{
	WinSet, Transparent, 255,% TraWin
	WinSet, TransColor, OFF,% TraWin
	WinSet, Transparent, OFF,% TraWin
}
Return
;------
!down::
WinGet, Trans,Transparent,% TraWin := "ahk_id " uid
Trans := (Trans = "") ? 239 : Max(15, Trans - 16)
WinSet, Transparent, %Trans%,% TraWin
Return

Post Reply

Return to “Ask for Help (v1)”