Open Side Menu Go to the Top
Register
Quick Questions & Answers Thread Quick Questions & Answers Thread

04-09-2008 , 09:10 PM
Go find, and make a copy of that log file - so you can send it to PT3 support, on their website. That would be my suggestion, and that is probably what PA will tell you to do, afaik.
Quick Questions & Answers Thread Quote
04-10-2008 , 02:18 AM
Is there an ahk script, or an easy way to hack an existing script, that will let me bind a key (say, F12) to an existing pokerstars custom layout? I play up to 30+ tables, mostly stacked at regular size, and I'm always dragging my current STT bubbles and itms over to vacant monitor real estate on my 2 or 3 monitors. A current ahk script that I use, which is probably based on PaulB/Handsome's script, binds F1 to cascade, which apparently works by selecting the menu then sending either a "C" for cascade or "T" for tile? I'm guessing what I'd want to do is select the same menu and then send a mouseclick where I have a pre-saved custom layout (e.g., my 30 table stacked layout).

Additionally, is there a script that allows for activating a table that needs attention? I often lose the focus when I'm loading a new tourney and a new table pops.

Lastly, I'd like to bind this feature (pop up table that requires attention, or cycle thru tables) to a 3rd or 4th mouse button that I have. I can bind these extra buttons, right? How do I know what button is what? (I seem to remember someone binding extra mouse buttons to Phantom F-keys....e.g., F14, F15 and then doing some type of re-direct to the mouse?)
Quick Questions & Answers Thread Quote
04-10-2008 , 04:45 AM
Does anyone know how to change your password on pacific poker?
Quick Questions & Answers Thread Quote
04-10-2008 , 06:59 AM
How is it with Party these days, I used to use MTH with it's flashing borders, making table active and moving cursor over table, so I could just right click mouse to activate bet pot script and press a key to bet.

Is this still how it works or have set ups changed ? (is MTH dead, saw a orca post recently that made it seem so ?)
Quick Questions & Answers Thread Quote
04-10-2008 , 11:25 AM
Quote:
Originally Posted by CheeseMoney
Is there an ahk script, or an easy way to hack an existing script, that will let me bind a key (say, F12) to an existing pokerstars custom layout? I play up to 30+ tables, mostly stacked at regular size, and I'm always dragging my current STT bubbles and itms over to vacant monitor real estate on my 2 or 3 monitors. A current ahk script that I use, which is probably based on PaulB/Handsome's script, binds F1 to cascade, which apparently works by selecting the menu then sending either a "C" for cascade or "T" for tile? I'm guessing what I'd want to do is select the same menu and then send a mouseclick where I have a pre-saved custom layout (e.g., my 30 table stacked layout).

Additionally, is there a script that allows for activating a table that needs attention? I often lose the focus when I'm loading a new tourney and a new table pops.

Lastly, I'd like to bind this feature (pop up table that requires attention, or cycle thru tables) to a 3rd or 4th mouse button that I have. I can bind these extra buttons, right? How do I know what button is what? (I seem to remember someone binding extra mouse buttons to Phantom F-keys....e.g., F14, F15 and then doing some type of re-direct to the mouse?)

A, StarsPlanner lets you define and save layouts. In the default version you need to choose a different layout with 2-3 mouseclicks. It wouldn't be rocket-science to let you assign hotkeys to layouts though.

B, TableNavigator or StarsAssistant (I prefer the latter right now but it is a matter of preference)

C, I don't understand
Quick Questions & Answers Thread Quote
04-10-2008 , 03:37 PM
Quote:
Originally Posted by fozzy71
Nope, no clue how to make app's auto minimize, or log-in. I am just glad that it saves me ~8 clicks at the start of each session. I wish it could exit all my scripts and apps too (perhaps it can?). Guess I should read up on it some more.

What is this program and where can I get it?
Quick Questions & Answers Thread Quote
04-10-2008 , 03:39 PM
Quote:
Originally Posted by MYNAMEIZGREG
What is this program and where can I get it?
TheOpener by TheIrishThug (2+2)

http://www.visitthesaint.com/software/the-opener/

Its an AHK script, w/ GUI setup/control - to open any App's you set up.
Quick Questions & Answers Thread Quote
04-10-2008 , 05:42 PM
is it possible to datamine pacific poker? what tools do i need?
Quick Questions & Answers Thread Quote
04-10-2008 , 05:57 PM
nm figured it out
Quick Questions & Answers Thread Quote
04-10-2008 , 09:17 PM
Quote:
Originally Posted by Everlong
A, StarsPlanner lets you define and save layouts. In the default version you need to choose a different layout with 2-3 mouseclicks. It wouldn't be rocket-science to let you assign hotkeys to layouts though.

B, TableNavigator or StarsAssistant (I prefer the latter right now but it is a matter of preference)

C, I don't understand
A) Thanks for the reply. I get a 'too many tables' warning with StarsPlanner. I need to stack at least 30 in the top left of monitor 1 at normal size. I don't think starsplanner will let me do this.

B) Is there a way to hit a key and cycle thru tables? This is pretty huge when playing stacked.

C) I want to hit the extra button on my mouse and have it do the aforementioned table cycling. I've heard that you have to do something (a workaround) in order to bind to the additional mousebuttons. Someone once mentioned creating an imaginary F14 function key that AHK will recognize and then using some other program to bind the extra mouse key to this imaginary F14. This may be overcomplicating things. I dunno.

I appreciate any help. Going from cascaded to stacked really helped my wrist. I'm hoping with some more ahk help I'll prolong the inevitable damage that goes with massive multitabling.
Quick Questions & Answers Thread Quote
04-10-2008 , 09:27 PM
Quote:
Originally Posted by CheeseMoney
A) Thanks for the reply. I get a 'too many tables' warning with StarsPlanner. I need to stack at least 30 in the top left of monitor 1 at normal size. I don't think starsplanner will let me do this.
Then you need to create/capture a new layout with *at least* 30 tables. Yes, if StarsPlanner is set to manage 12 tables or whatever, it WILL close extra ones if there are no spare slots.

So make a layout with enough slots There is no limit to tables inherent to StarsPlanner.

Quote:
B) Is there a way to hit a key and cycle thru tables? This is pretty huge when playing stacked.
No, but it wouldn't be hard to add. I'll look in to it.

Quote:
C) I want to hit the extra button on my mouse and have it do the aforementioned table cycling. I've heard that you have to do something (a workaround) in order to bind to the additional mousebuttons. Someone once mentioned creating an imaginary F14 function key that AHK will recognize and then using some other program to bind the extra mouse key to this imaginary F14. This may be overcomplicating things. I dunno.
Depends on your mouse. A Microsoft mouse probably already exposes it's extra buttons as Xbutton1 and XButton2 - A Logitech you will need to get SetPoint and UberOptions software, this is what enables you to map any button to "phantom" F-keys. Very useful.
Quick Questions & Answers Thread Quote
04-11-2008 , 02:12 AM
Quote:
Originally Posted by _dave_
Then you need to create/capture a new layout with *at least* 30 tables. Yes, if StarsPlanner is set to manage 12 tables or whatever, it WILL close extra ones if there are no spare slots.

So make a layout with enough slots There is no limit to tables inherent to StarsPlanner.
Thanks Dave. I'd experimented with Starsplanner a long time ago and didn't realize that it was my setup that was causing the error. Can't wait to get it working/configured with a hotkey.

No, but it wouldn't be hard to add. I'll look in to it.
That would be awesome. I'm just learning AHK but I'll post something if I get anything working.


Depends on your mouse. A Microsoft mouse probably already exposes it's extra buttons as Xbutton1 and XButton2 - A Logitech you will need to get SetPoint and UberOptions software, this is what enables you to map any button to "phantom" F-keys. Very useful.
I have an "Emprex" mouse. I have never heard of the company. Are Setpoint and UberOptions logitech proprietary software, or will they work with any mouse? Either way, I totally plan on buying new ergonomic pointing devices-- a logitech trackball and that microsoft mouse that everyone's always saying is so comfortable.
Thanks _dave_.
Quick Questions & Answers Thread Quote
04-11-2008 , 02:12 AM
One additional question:
My current playing style is stack up to 30 tables in the top left quadrant of one of Monitor 1. Tables pop automatically per checking the advanced multitable option on stars. Despite losing focus when new tables pop, it works pretty well (this is where the table cycler would work great, as I have to wait until one of the minimized tables in the task tray starts flashing so that I can find a table that needs attention--remember, the tables are stacked in the top left, so its not like I can click around looking for an active table).

Whenever I get to an interesting situation-- be it the bubble, or me wanting to see what hands go to showdown, or take a note, I drag the table to a vacant quadrant. I have 3 vacant quadrants on Monitor 1 and 4 vacant quadrants on Monitor 2 (unfortunately, monitor 3 is broken.) Problem is, when you have so many tables going, stars will try to steal focus, making notes and dragging tables around can real difficult at times.

Do you think it would be possible for me to hack your existing program so that pushing a hotkey takes the active table and moves it to a vacant quadrant? I.E, using AHK, is there a way to tweak the program so that it remembers what quadrants are vacant, and pushing, say, F12 would move the current active table to one of those vacant quadrants so long as there is one available?
Quick Questions & Answers Thread Quote
04-11-2008 , 12:49 PM
Hello, seemingly many of the links in the FAQ are busted... any chance of getting these fixed? Thanks.
Quick Questions & Answers Thread Quote
04-11-2008 , 05:33 PM
I feel really dumb posting this, but I can't get pokerpad to work for stars. I ran it, it shows up in the tray. I launched a tournament and when I hit the hotkeys, they just show up in the chat window. This is my first time using a script, so am I missing something? I did do a play money tournament so as to not mess with my real money, is that the problem? I did a little searching, but since I also can't figure out how to get a thread returned in the search to open to the relevant post, that was useless. Am I a donkey at life?
Quick Questions & Answers Thread Quote
04-11-2008 , 09:41 PM
For those that use The Opener:

I pmed TheIrishThug about the minimize function.

Here's what you need to do to get the minimize to work (with some windows - not all windows will respond to the minimize function).

In opener.ahk look for the lines (Should be at about line #1212):
Code:
  If (CheckForNone AND Location = "" AND WinTitle = "None")
    Return -1
  If !CheckAndRun(Location, Name, WinTitle, Minimize, Priority)
    Return 0
Change that to:
Code:
  If (CheckForNone AND Location = "" AND WinTitle = "None")
    Return -1
  If (Minimize = "Yes")
    Minimize = Min
  If !CheckAndRun(Location, Name, WinTitle, Minimize, Priority)
    Return 0
Thanks to TheIrishThug for his help and for writing the script in the first place.
Quick Questions & Answers Thread Quote
04-11-2008 , 10:11 PM
Any chance of getting a fixed script posted? I tried to do as you said:

Quick Questions & Answers Thread Quote
04-12-2008 , 01:14 AM
Quote:
Originally Posted by fozzy71
Any chance of getting a fixed script posted? I tried to do as you said:

Code:
; The Operner
; Patrick Lannigan
; v.14
; requires at least AutoHotkey v1.0.47.01
SetWorkingDir, %A_ScriptDir%
SetFormat, Float, 0.0
logging = 0 ; 0 for Off, 1 for On
SetTitleMatchMode, 2 ; Window Title contain WinTitle anywhere inside it to be a match
/*
[first_time]
first_time=0
remind_none_radio=1
*/
version = v.14
NoMainGui = 1
IniRead, FirstTime, %A_ScriptFullPath%, first_time, first_time, 1
IniRead, RemindNoneRadio, %A_ScriptFullPath%, first_time, remind_none_radio, 1
If FirstTime
{
  string =
  (LTrim
  Welcome to The Opener.
  Since this is the first time running the script,
  you will need to setup what objects you would like to launch.
  Would you like to pre-load the sample settings?
  
  If you need help:
  Read README.txt or
  Contact me at fes421@yahoo.com with questions.
  )
  MsgBox, 68, The Opener, %string%
  IfMsgBox Yes
  {
    FileCopy, sample.ini, opener.ini, 1
    string = First Time`nSample Loaded
  }
  Else
    string = First Time  
  IniWrite, 0, %A_ScriptFullPath%, first_time, first_time
  LogToFile(string)
  GoSub, RunEdit
  Return
}  
IfNotExist, opener.ini
{
  string =
  (LTrim
  Your settings file could not be found.
  
  You will be taken to setup what objects you would like to launch.
  )
  MsgBox, 48, The Opener, %string%
  GoSub, RunEdit
  Return
}
string = -------------------------------------------------------------`n
LogToFile(string)
CheckGroupStructure()
BuildMainGui:
NoMainGui = 0
fStyle = s9
fFace = Arial
fColor = 0x000000
pad_w = 28
Gui, Font, %fStyle% c%fColor%, %fFace%
; --------------------------------------------------
;     "Opener" Gui and Functions
;       Gui Number: 1
IniRead, ControlCount, opener.ini, structure, control_count, 0
IniRead, RadioGroupCount, opener.ini, structure, radio_group_count, 0
IniRead, HasCheckboxGroup, opener.ini, structure, has_check_group, 0
Loop, %RadioGroupCount%
{
  IniRead, Radio%A_Index%Cols, opener.ini, structure, radio_group%A_Index%_cols, 1
  IniRead, Radio%A_Index%Label, opener.ini, structure, radio_group%A_Index%_name, Group %A_Index%
}
If (ControlCount != 0)
{
  Loop, %ControlCount%
  {
    IniRead, ControlType, opener.ini, control_%A_Index%, item_type, ---
    If (ControlType = "Radio")
    {
      IniRead, RadioGroupID, opener.ini, control_%A_Index%, item_group, ---
      Radio%RadioGroupID%_0++
      ControlName := "Radio" . RadioGroupID . "_" . Radio%RadioGroupID%_0
    }
    Else
    {
      Check0++
      ControlName = Check%Check0%
    }
    IniRead, %ControlName%Name, opener.ini, control_%A_Index%, item_name, ---
    IniRead, %ControlName%IsDefault, opener.ini, control_%A_Index%, item_is_default, ---
    %ControlName%ID := A_Index
    %ControlName%Width := GetTextSize(%ControlName%Name, fStyle "," fFace, 0 , pad_w)
  }
  RadioGroupID := "", CurrentGroup := 0, NewGroup := 0, MostItemsPerCol := 0
  Loop, %RadioGroupCount%
  {
    ItemID := 0, ItemRow := 0, NewGroup := 1, CurrentGroup++
    ItemsInGroup := Radio%CurrentGroup%_0
    If Not ItemsInGroup
      ItemsInGroup = 0
    ColForGroup := Radio%CurrentGroup%Cols
      ; Calculate Items/Col
    ItemsPerCol := Ceil(ItemsInGroup / ColForGroup)
    If (ItemsPerCol > MostItemsPerCol)
      MostItemsPerCol := ItemsPerCol
    tempvar := ItemsInGroup / ItemsPerCol
    If ( tempvar = Round(tempvar) AND tempvar != ColForGroup) ; Adjust for blank last column
      ColForGroup := tempvar
    string = ColForGroup := %ColForGroup%`nItemsPerCol := %ItemsPerCol%
    LogToFile(string)
  
    tempMaxColWidth := 0, tempTotalGroupWidth := 0, Col := 1
    Loop, %ItemsInGroup%
    {
      ItemID++, ItemRow++
      string := "Radio%CurrentGroup%_%ItemID%Width = " . Radio%CurrentGroup%_%A_Index%Width
      LogToFile(string)
      If (Radio%CurrentGroup%_%ItemID%Width > tempMaxColWidth)
        tempMaxColWidth := Radio%CurrentGroup%_%ItemID%Width
      string = tempMaxColWidth = %tempMaxColWidth%
      LogToFile(string)
      If (ItemRow = ItemsPerCol)
      {
        tempTotalGroupWidth += tempMaxColWidth
        Radio%CurrentGroup%_Col%Col%Width := tempMaxColWidth
        string = Col = %Col%`nRadio%CurrentGroup%_Col%Col%Width := %tempMaxColWidth%`ntempTotalGroupWidth := %tempTotalGroupWidth%
        LogToFile(string)
        tempMaxColWidth := 0, ItemRow:= 0, Col++
      }
    }
    If (!Radio%CurrentGroup%_Col%Col%Width And Col <= ColForGroup)
    {
      tempTotalGroupWidth += tempMaxColWidth
      Radio%CurrentGroup%_Col%Col%Width := tempMaxColWidth
      string = ------Col = %Col%`n------Radio%CurrentGroup%_Col%Col%Width := %tempMaxColWidth%`n------tempTotalGroupWidth :=
      string .= " " . tempTotalGroupWidth
      LogToFile(string)
    }
  
    GroupLabel := Radio%A_Index%Label
    string = ItemsInGroup = %ItemsInGroup%
    LogToFile(string)
    If (ItemsInGroup = 0)
    {
      tempTotalGroupWidth := GetTextSize(GroupLabel, fStyle "," fFace, 0 , pad_w)
      string = tempTotalGroupWidth = %tempTotalGroupWidth%
      LogToFile(string)
    }
    If (CurrentGroup = 1)
      Options = x10
    Else
      Options := "xp+" OldGroupColWidth + 15
    Options .= " y10 w" . tempTotalGroupWidth + 15 . " h" . (ItemsPerCol + 1) * 25
    string = Gui, Add, GroupBox, %Options%, %GroupLabel%
    LogToFile(string)
    Gui, Add, GroupBox, %Options%, %GroupLabel%
    string = --Start Loop--CurrentGroup= %CurrentGroup%
    LogToFile(string)
    Col := 1, ItemID := 0, ItemRow := 0
    Loop, %ItemsInGroup%
    {
      ItemID++, ItemRow++
      ; Positioning
      string = ItemRow = %ItemRow%`nItemID = %ItemID%
      LogToFile(string)
      If (ItemID != 1 AND ItemRow = 1)
        Options := "xp+" . OldColWidth . " yp-" . (OldItemRow - 1) * 25
      Else If (NewGroup = 1)
      {
        Options := "xp+10 yp+20"
        NewGroup = 0
      }
      Else
        Options := "xp yp+25"
      ; Default to Selected?
      If (Radio%CurrentGroup%_%ItemID%IsDefault = "Yes")
        Options .= " Checked"
      ; Start a new group of Radios?
      If (ItemID = 1)
        Options .= " Group vRadioGroup" . CurrentGroup
      Value := Radio%CurrentGroup%_%ItemID%Name
      Gui, Add, Radio, %Options%, %Value%
      string = Gui, Add, Radio, %Options%, %Value%
      LogToFile(string)
      OldItemRow = %ItemRow%
      If (ItemRow = ItemsPerCol)
      {
        string = OldColWidth := %OldColWidth%, Col=%Col%
        LogToFile(string)
        ItemRow := 0, OldColWidth := Radio%CurrentGroup%_Col%Col%Width, Col++
        string = OldColWidth := %OldColWidth%, Col=%Col%
        LogToFile(string)
      }
      Radio%CurrentGroup%_%ItemID%Name := , Radio%CurrentGroup%_%ItemID%IsDefault :=
    }
    If (Col > ColForGroup)
      Col--
    If (ItemsInGroup = 0)
      OldGroupColWidth := GetTextSize(GroupLabel, fStyle "," fFace, 0 , pad_w + 15)
    Else
      OldGroupColWidth := Radio%CurrentGroup%_Col%Col%Width
  }
  If (HasCheckboxGroup = 1)
  {
    IniRead, ColForGroup, opener.ini, structure, radio_groupCB_cols, 1
    IniRead, CBLabel, opener.ini, structure, radio_groupCB_name, Checkboxes
    ItemID := 0, ItemRow := 0, ItemsInGroup := Check0
    ; Calculate Items/Col
    ItemsPerCol := Ceil(ItemsInGroup / ColForGroup)
    If (ItemsPerCol > MostItemsPerCol)
      MostItemsPerCol := ItemsPerCol
    tempvar := ItemsInGroup / ItemsPerCol
    If ( tempvar = Round(tempvar) AND tempvar != ColForGroup) ; Adjust for blank last column
      ColForGroup := tempvar
    string = -----`n  ColForGroup := %ColForGroup%`n  ItemsPerCol := %ItemsPerCol%
    LogToFile(string)
    tempMaxColWidth := 0, tempTotalGroupWidth := 0, Col := 1
    Loop, %ItemsInGroup%
    {
      ItemID++, ItemRow++
      string := "Check" . ItemID . "Width = " . Check%ItemID%Width
      LogToFile(string)
      If (Check%ItemID%Width > tempMaxColWidth)
        tempMaxColWidth := Check%ItemID%Width
      string = tempMaxColWidth = %tempMaxColWidth%
      LogToFile(string)
      If (ItemRow = ItemsPerCol)
      {
        tempTotalGroupWidth += tempMaxColWidth
        CheckCol%Col%Width := tempMaxColWidth
        string = Col = %Col%`nCheckCol%Col%Width := %tempMaxColWidth%
        LogToFile(string)
        tempMaxColWidth := 0, ItemRow:= 0, OldColWidth := CheckCol%Col%Width, Col++
      }
    }
    If Not CheckCol%Col%Width
    {
      tempTotalGroupWidth += tempMaxColWidth
      CheckCol%Col%Width := tempMaxColWidth
      string = ------Col = %Col%`n------CheckCol%Col%Width := %tempMaxColWidth%
      LogToFile(string)
    }
    If (RadioGroupCount = 0)
      Options = x10
    Else
      Options := "xp+" . OldGroupColWidth + 15
    Options .= " y10 w" . tempTotalGroupWidth +15 . " h" . (ItemsPerCol + 1) * 25
    Gui, Add, GroupBox, %Options%, %CBLabel%
    string = Gui, Add, GroupBox, %Options%, %CBLabel%
    LogToFile(string)
    Col := 1, ItemID := 0, ItemRow := 0
    Loop, %ItemsInGroup%
    {
      ItemID++, ItemRow++
      ; Positioning
      If (ItemID = 1)
        Options := "xp+10 yp+15"
      Else If (ItemRow = 1)
        Options := "xp+" . OldColWidth . " yp-" . (OldItemRow - 1) * 25
      Else
        Options = xp yp+25
      
      ; Default to Selected?
      If (Check%ItemID%IsDefault = "Yes")
        Options .= " Checked"
      ; Start a new group of Radios?
      Options .= " vCheckbox" . ItemID
      Value := Check%ItemID%Name
      Gui, Add, Checkbox, %Options%, %Value%
      string = Gui, Add, Checkbox, %Options%, %Value%
      LogToFile(string)
      OldItemRow = %ItemRow%
      If (ItemRow = ItemsPerCol)
        ItemRow := 0, OldColWidth := CheckCol%Col%Width, Col++
      Check%ItemID%Name :=, Check%ItemID%IsDefault :=
    }
  }
  Loop, %RadioGroupCount%
  {
    CurrentGroup := A_Index
    Loop
    {
      If Radio%CurrentGroup%_Col%A_Index%Width
        Radio%CurrentGroup%_Col%A_Index%Width :=
      Else
        Break
    }
  }
  OldColWidth :=
  If (HasCheckboxGroup = 1)
    Loop
    {
      If CheckCol%A_Index%Width
        CheckCol%A_Index%Width :=
      Else
        Break
    }
  ItemRow := OldItemRow
  string = OldItemRow = %OldItemRow%`nMostItemsPerCol = %MostItemsPerCol%`nItemsPerCol = %ItemsPerCol%`n
  If (OldItemRow == 0)
    ItemRow := ItemsPerCol
  If (ItemRow == MostItemsPerCol) ; If last group ended on how many items it has per col
    ItemRow := MostItemsPerCol ; change ItemRow so yp+ will be 45
  string .= "(" . MostItemsPerCol . "-" . ItemRow . ") * 25 + 45`nItemRow = " . ItemRow
  LogToFile(string)
  Options := "x10 yp+" . (MostItemsPerCol - ItemRow) * 25 + 45
  string = RadioGroupCount = %RadioGroupCount%`nHasCheckboxGroup = %HasCheckboxGroup%`nGui Add, Button, %Options% w65 gRunOK, Ok`nGui Add, Button, xp+75 yp w65 gRunCancel, Cancel
  Gui Add, Button, %Options% w65 gRunOK, Ok
  Gui Add, Button, xp+75 yp w65 gRunCancel, Cancel
}
Else ; There are no radio groups or checkboxes 
{
  string = RadioGroupCount = %RadioGroupCount%`nHasCheckboxGroup = %HasCheckboxGroup%`nThere are no radio groups or checkboxes setup.`nGui Add, Text, x10 y10, There are no radio groups or checkboxes setup. 
  string .= "Gui Add, Button, xp yp+30 w65 gRunCancel, Cancel"
  Gui Add, Text, x10 y10, There are no radio groups or checkboxes setup. 
  Gui Add, Button, xp yp+30 w65 gRunCancel, Cancel
}
string .= "`nGui Add, Button, xp+75 yp w65 gRunEdit, Edit Setup"
LogToFile(string)
Gui Add, Button, xp+75 yp w65 gRunEdit, Edit Setup
Gui, Show, ,The Opener %version%
Return

RunOK:
Gui, Submit
string = `n`nOK PRESSED`nRadioGroupCount = %RadioGroupCount%
LogToFile(string)
Loop, %RadioGroupCount%
{
  RadioID := RadioGroup%A_Index%
  string = RadioID (RadioGroup%A_Index%) := %RadioID%
  LogToFile(string)
  If (RadioID != 0 && RadioID != "")
  {
    string = Result := LoadData(Radio%A_Index%_%RadioID%ID, 1)
    LogToFile(string)
    Result := LoadData(Radio%A_Index%_%RadioID%ID, 1) 
    If (Result = -1)
      Continue
    Else If (Result = 0)
    {
      Gui, Show
      Return
    }
  }
}
string = `nCheckCount = %Check0%
LogToFile(string)
RadioID =
Loop, %Check0%
{
  If (Checkbox%A_Index% AND !LoadData(Check%A_Index%ID))
  {
    Gui, Show
    Return
  }
}
ExitApp

GuiClose:
RunCancel:
ExitApp
Return

; --------------------------------------------------
;     "Edit Items" Gui and Functions
;       Gui Number: 2

RunEdit:
Gui, +Disabled
Gui, 2:Default
Gui, +Resize +MinSize
If NoMainGui
  Gui, +Owner1  
Gui, Add, Text, x8 y7, Name
Gui, Add, Edit, xp yp+25 w120 h20 vItemName,
Gui, Add, Text, xp yp+55, Window Title
Gui, Add, Edit, xp yp+25 w120 h20 vItemWinTitle, 
Gui, Add, Text, xp+150 yp-105, Default
Gui, Add, Checkbox, xp yp+25 vItemIsDefault, Yes
Gui, Add, Text, xp+65 yp-25, Minimize
Gui, Add, Checkbox, xp yp+25 vItemMinimize, Yes
Gui, Add, Text, xp-75 yp+55, Location
Gui, Add, Button, xp+75 yp gSelectLoc, Select
Gui, Add, Edit, xp-75 yp+25 w120 h20 ReadOnly -Tabstop vItemLoc,
Gui, Add, Text, xp+150 yp-105, Type
Gui, Add, Radio, xp yp+25 Checked gEditType vItemType, Radio
Gui, Add, Radio, xp yp+20 gEditType, Checkbox
Gui, Add, Text, xp-5 yp+35, Priority
Gui, Add, DropDownList, xp yp+25 w75 +R5 vItemPriority, High|Above Normal|Normal||Below Normal|Low
Gui, Add, Text, xp+115 yp-105, Group

IniRead, RadioGroupCount, opener.ini, structure, radio_group_count, 1
select =
Loop,  %RadioGroupCount%
{
  select .= A_Index . "|"
  If (A_Index = 1)
    select .= "|" 
}
Gui, Add, DropDownList, xp yp+20 w40 R3 vItemGroup, %select%
Gui, Add, Button, xp-10 yp+30 gEditGroups, Edit Groups
Gui, Add, Text, xp+130 yp-50, Run Code
Gui, Add, CheckBox, xp yp+20 gEditRunCode vItemRunCode, Yes
Gui, Add, Button, xp yp+25 Disabled gSelectRunCode vSelectRunCode, Select
Gui, Add, Text, xp-20 yp+30 vScriptCountText, Script Count: 0
Gui, Add, Button, xp-460 yp+65 w125 h30 gEditSelected, Edit Selected
Gui, Add, Button, xp+200 yp w125 h30 gRemoveSelected, Remove Selected
Gui, Add, Button, xp+200 yp w125 h30 gSaveEdits, Save Edits
names = Name|Window Title|Location|Type|Group|Default|Minimize|Priority|Run Code|Script Count
Gui, Add, ListView, xp-440 yp+50 w600 h180 Grid NoSort vLV_Items, %names%
Gui, Add, Button, xp+40 yp+190 w125 h30 gMoveSelected, Move Selected Up
Gui, Add, Button, xp+200 yp w125 h30 gMoveSelected, Move Selected Down
Gui, Add, Button, xp+200 yp w125 h30 g2GuiClose, Save && Close

;Fill ListView
FileCopy, opener.ini, opener.tmp, 1 
IniRead, ItemCount, opener.ini, structure, control_count, 0
Loop, %ItemCount%
{
  IniRead, tempName, opener.ini, Control_%A_Index%, item_name,
  IniRead, tempWinTitle, opener.ini, Control_%A_Index%, item_win_title,
  IniRead, tempLoc, opener.ini, Control_%A_Index%, item_loc,
  IniRead, tempType, opener.ini, Control_%A_Index%, item_type,
  IniRead, tempGroup, opener.ini, Control_%A_Index%, item_group,
  IniRead, tempIsDefault, opener.ini, Control_%A_Index%, item_is_default,
  IniRead, tempMinimize, opener.ini, Control_%A_Index%, item_minimize,
  IniRead, tempPriority, opener.ini, Control_%A_Index%, item_priority,
  IniRead, tempRunCode, opener.ini, Control_%A_Index%, item_run_code,
  IniRead, tempScriptCount, opener.ini, Control_%A_Index%, item_script_count,
  Gui, ListView, LV_Items
  LV_Add("", tempName, tempWinTitle, tempLoc, tempType, tempGroup, tempIsDefault, tempMinimize, tempPriority, tempRunCode, tempScriptCount)
  IniDelete, opener.ini, Control_%A_Index%
}
tempName := , tempWinTitle := , tempLoc := , tempType := , tempGroup := , tempIsDefault := 
tempMinimize := , tempPriority := , tempRunCode := , tempScriptCount :=, select:=
LV_ModifyCol(1, "AutoHdr")
LV_ModifyCol(2, "AutoHdr")
LV_ModifyCol(3, "AutoHdr")
LV_ModifyCol(4, "AutoHdr")
LV_ModifyCol(8, "AutoHdr")
LV_ModifyCol(10, "AutoHdr")

Gui, Show, , Edit Items
ItemId := LV_GetCount() + 1 
ItemScriptCount = 0
ItemEdit = 0
Return

2GuiSize:
Anchor("LV_Items", "wh")
Anchor("Move Selected Up", "y")
Anchor("Move Selected Down", "y")
Anchor("Save && Close", "y")
Return

SelectLoc:
Gui, +OwnDialogs
FileSelectFile, Loc, 3, ,Select File...
If (ErrorLevel = 0)
  GuiControl, , ItemLoc, %Loc%
Return

EditType:
Gui, Submit, NoHide
If (A_GuiControl = "Checkbox")
  GuiControl, Disable, ItemGroup
Else
  GuiControl, Enable, ItemGroup
Return
; --------------------------------------------------
;     "Edit Groups" Gui and Functions
;       Gui Number: 3
EditGroups:
Gui, Submit, NoHide
Gui, +Disabled
Gui, 3:Default
Gui, +Owner2
Gui, Add, Text, x7 y7, Groups for separating Radio Controls
Gui, Add, Text, xp yp+30, Checkbox Name
Gui, Add, Edit, xp yp+25 w130 h20 vCheckboxName,
Gui, Add, Text, xp+140 yp-25, Columns Count
Gui, Add, Edit, xp+10 yp+25 w40 h20 Limit2 vCheckboxCol,
Gui, Add, UpDown, Range1-10, 1
Gui, Add, CheckBox, xp-100 yp+25 gIncludeCheckGroup vHasCheckGroup, Checkbox Group
Gui, Add, Text, xp-50 yp+30, Group Name
Gui, Add, Edit, xp yp+25 w130 h20 vGroupName,
Gui, Add, Text, xp+140 yp-25, Columns Count
Gui, Add, Edit, xp+10 yp+25 w40 h20 Limit2 vGroupCol,
Gui, Add, UpDown, Range1-10, 1
Gui, Add, Button, xp-120 yp+50 w65 gGroupEdit, Edit
Gui, Add, Button, xp+100 yp w65 gGroupSave, Save
Gui, Add, ListView, xp-130 yp+30 w225 h100 vLV_Groups, Group|Group Name|Columns Count
Gui, Add, Button, xp yp+125 w70 gMoveSelected, Move Up
Gui, Add, Button, xp+80 yp w70 gMoveSelected, Move Down
Gui, Add, Button, xp+80 yp w70 gRemoveSelected, Remove
Gui, Add, Button, xp-130 yp+30 w70 g3GuiClose, Cancel
Gui, Add, Button, xp+100 yp w70 g3GuiClose, Done
IniRead, RadioGroupCount, opener.ini, structure, radio_group_count, 1
If (HasCheckboxGroup = 1)
  GuiControl, , HasCheckGroup, 1
Else
{
  GuiControl, , HasCheckGroup, 0
  GuiControl, Disable, CheckboxName
  GuiControl, Disable, CheckboxCol
}

IniRead, CBName, opener.ini, structure, radio_groupCB_name, -
IniRead, CBCols, opener.ini, structure, radio_groupCB_cols, 1
IniDelete, opener.ini, Control_%ItemID%, radio_groupCB_cols
IniDelete, opener.ini, Control_%ItemID%, radio_groupCB_name
GuiControl, , CheckboxName, %CBName%
GuiControl, , CheckboxCol, %CBCols%


Gui, ListView, LV_Groups
Loop, %RadioGroupCount%
{
  IniRead, Name, opener.ini, structure, radio_group%A_Index%_name, -
  IniRead, Cols, opener.ini, structure, radio_group%A_Index%_cols, 1
  IniDelete, opener.ini, Control_%ItemID%, radio_group%A_Index%_cols
  IniDelete, opener.ini, Control_%ItemID%, radio_group%A_Index%_name
  LV_Add("", A_Index, Name, Cols)
}
GroupID :=  RadioGroupCount + 1
GroupEdit = 0
LV_ModifyCol(2, "AutoHdr")
Gui, Show, , Edit Script List
Return

IncludeCheckGroup:
Gui, Submit, NoHide
If HasCheckGroup
{
  GuiControl, Enable, CheckboxName
  GuiControl, Enable, CheckboxCol
}
Else
{
  GuiControl, Disable, CheckboxName
  GuiControl, Disable, CheckboxCol
}
Return

GroupEdit:
Gui, ListView, LV_Groups
GroupID := LV_GetNext()
If (GroupID != 0)
{
  LV_GetText(GroupName, GroupID, 2)
  LV_GetText(GroupCol, GroupID, 3)
  GuiControl, , GroupName, %GroupName%
  GuiControl, , GroupCol, %GroupCol%
}
Return

GroupSave:
Gui, Submit, NoHide
If (GroupName = "")
  Msgbox, , Missing Data, Group Name can not be blank.
Else
{
  GroupEdit = 1
  Gui, ListView, LV_Groups
  If (GroupID > LV_GetCount())
    LV_Add("", GroupID, GroupName, GroupCol)
  Else
    LV_Modify(GroupID, "", GroupID, GroupName, GroupCol)
  GuiControl, , GroupName, 
  GuiControl, , GroupCol, 1
  GroupID := LV_GetCount() + 1
}
Return

FinalizeGroups:
Gui, Submit
Gui, ListView, LV_Groups
RadioGroupCount := LV_GetCount()
IniDeleteMatch("opener.ini","structure","radio_group") ; Delete all keys containing radio_group
Loop, %RadioGroupCount%
{
  LV_GetText(Name, A_Index, 2)
  LV_GetText(Cols, A_Index, 3)
  IniWrite, %Name%, opener.ini, structure, radio_group%A_Index%_name
  IniWrite, %Cols%, opener.ini, structure, radio_group%A_Index%_cols
  IniWrite, %Name%, opener.tmp, structure, radio_group%A_Index%_name
  IniWrite, %Cols%, opener.tmp, structure, radio_group%A_Index%_cols
}
IniWrite, %RadioGroupCount%, opener.ini, structure, radio_group_count
IniWrite, %CheckboxName%, opener.ini, structure, radio_groupCB_name
IniWrite, %CheckboxCol%, opener.ini, structure, radio_groupCB_cols
IniWrite, %RadioGroupCount%, opener.tmp, structure, radio_group_count
IniWrite, %CheckboxName%, opener.tmp, structure, radio_groupCB_name
IniWrite, %CheckboxCol%, opener.tmp, structure, radio_groupCB_cols
IniWrite, %HasCheckGroup%, opener.tmp, structure, has_check_group
select =
Loop,  %RadioGroupCount%
{
  select .= A_Index . "|"
  If (A_Index = 1)
    select .= "|" 
}
GuiControl, 2:, ItemGroup, |%select%
select =
Return

3GuiClose:
Gui, Submit, NoHide
If (A_GuiControl = "Done" OR (A_GuiControl != "Cancel"
    AND (GroupEdit = 1 OR CBName != CheckboxName OR CBCols != CheckBoxCol) 
    AND (MsgBoxYesNo("You have made edits that have not been saved!`nWould you like to save them?"
      , 52, "Cancel Edits?") = 1)))
{
  GoSub, FinalizeGroups
  GroupEdit = 0
}
Gui, 2:Default
Gui, -Disabled
Gui, 3:Destroy

Gui, Show
Return
;     End "Edit Groups" Gui and Functions
; --------------------------------------------------

EditRunCode:
Gui, Submit, NoHide
ItemScriptCount = 0
If ItemRunCode
  GuiControl, Enable, SelectRunCode
Else
  GuiControl, Disable, SelectRunCode
GuiControl, , ScriptCountText, Script Count: %ItemScriptCount%
Return

; --------------------------------------------------
;     "Edit Script List" Gui and Functions
;       Gui Number: 4
SelectRunCode:
Gui, Submit, NoHide
Gui, +Disabled
Gui, 4:Default
Gui, +Owner2
Gui, Add, Text, x7 y7, Scripts to run when Item is launched:
Gui, Add, ListView, xp yp+30 w225 h100 vLV_Scripts, Script Path
Gui, Add, Button, xp yp+125 w65 gAddScript, Add Script
Gui, Add, Button, xp+80 yp w65 gRmScript, Remove
Gui, Add, Button, xp+80 yp w65 g4GuiClose, Done
file = opener.ini
IniRead, ScriptCount, opener.ini, Control_%ItemID%,item_script_count, --
If (ScriptCount = "--") ; Script has not been edited yet
{
  IniRead, ScriptCount, opener.tmp, Control_%ItemID%,item_script_count, --
  file = opener.tmp
}
Gui, ListView, LV_Scripts
Loop, %ScriptCount%
{
  IniRead, Script, %file%, Control_%ItemID%, script_%A_Index%, Control_%ItemID%-script_%A_Index%
  LV_Add("", Script)
  LV_ModifyCol()
}
Gui, Show, , Edit Script List

Return

AddScript:
Gui, +OwnDialogs
FileSelectFile, Loc, 3, ,Select File..., AutoHotkey Script (*.ahk)
If (ErrorLevel = 0)
{
  Gui, ListView, LV_Scripts
  LV_Add("", Loc)
  LV_ModifyCol()
}
Return

RmScript:
Gui, ListView, LV_Scripts
LV_Delete(LV_GetNext()) 
Return

4GuiClose:
Gui, ListView, LV_Scripts
ItemScriptCount := LV_GetCount()
Loop %ItemScriptCount%
{
  LV_GetText(Script, A_Index)
  IniWrite, %Script%, opener.ini, Control_%ItemID%, script_%A_Index%
}
IniWrite, %ItemScriptCount%, opener.ini, Control_%ItemID%, item_script_count
Gui, 2:Default
GuiControl, , ScriptCountText, Script Count: %ItemScriptCount%
Gui, -Disabled
Gui, 4:Destroy
Gui, Show
Return

;     End "Edit Script List" Gui and Functions
; --------------------------------------------------

EditSelected:
NewItemId := LV_GetNext()
If (NewItemId != 0)
{
  ItemId := NewItemId 
  LV_GetText(theItemName, ItemId, 1)
  LV_GetText(theItemWinTitle, ItemId, 2)
  LV_GetText(theItemLoc, ItemId, 3)
  LV_GetText(theItemType, ItemId, 4)
  LV_GetText(theItemGroup, ItemId, 5)
  LV_GetText(theItemIsDefault, ItemId, 6)
  LV_GetText(theItemMinimize, ItemId, 7)
  LV_GetText(theItemPriority, ItemId, 8)
  LV_GetText(theItemRunCode, ItemId, 9)
  LV_GetText(theItemScriptCount, ItemId, 10)
  If theItemScriptCount Is Not Integer
    theItemScriptCount = 0
  If theItemGroup Is Not Integer
    theItemGroup = 1
  GuiControl, , ItemName, %theItemName%
  GuiControl, , ItemWinTitle, %theItemWinTitle%
  GuiControl, , ItemLoc, %theItemLoc%
  If (theItemType = "Checkbox")
  {
    GuiControl, , Checkbox, 1
    GuiControl, Disable, ItemGroup
  }
  Else
  {
    GuiControl, , Radio, 1
    GuiControl, Enable, ItemGroup
    GuiControl, Choose, ItemGroup, %theItemGroup%
  }
  If (theItemIsDefault = "Yes")
    GuiControl, , ItemIsDefault, 1
  Else
    GuiControl, , ItemIsDefault, 0
  If (theItemMinimize = "Yes")
    GuiControl, , ItemMinimize, 1
  Else
    GuiControl, , ItemMinimize, 0
  If (theItemPriority = "High")
    GuiControl, Choose, ItemPriority, 1
  Else If (theItemPriority = "Above Normal")
    GuiControl, Choose, ItemPriority, 2
  Else If (theItemPriority = "Below Normal")
    GuiControl, Choose, ItemPriority, 4
  Else If (theItemPriority = "Low")
    GuiControl, Choose, ItemPriority, 5
  Else
    GuiControl, Choose, ItemPriority, 3
  If (theItemRunCode = "Yes")
  {
    GuiControl, , ItemRunCode, 1
    GuiControl, Enable, SelectRunCode
  }
  Else
  {
    GuiControl, , ItemRunCode, 0
    GuiControl, Disable, SelectRunCode
  }
  If theItemScriptCount Is Not Integer
    theItemScriptCount = 0
  GuiControl, , ScriptCountText, Script Count: %theItemScriptCount%
}
theItemName := , theItemWinTitle := , theItemLoc := , theItemType := , theItemGroup := 
theItemIsDefault := , theItemMinimize := , theItemPriority := , theItemRunCode := , theItemScriptCount := 
Return

SaveEdits:
Gui, Submit, NoHide
;Name|Window Title|Location|Type|Group|Default|Minimize|Priority|Run Code|Script Count
If (ItemName = "")
   MsgBox, , Missing Data, Name can not be blank.
Else
{
  If (ItemLoc = "")
  {
    If (RemindNoneRadio AND MsgBoxYesNo("You did not enter a file Location.`nIf you are intending to use this as a Radio that "
      . "will not run/open any program/file, make sure that the Window Title is set to 'None' (no quotes).`n`nWould you like this "
      . "to be the last time you are reminded of this?"))
    {
      RemindNoneRadio:= 0
      IniWrite, 0, %A_ScriptFullPath%, first_time, remind_none_radio
    }
  }
  If ItemIsDefault
    ItemIsDefault = Yes
  Else
    ItemIsDefault = No
  If ItemMinimize
    ItemMinimize = Yes
  Else
    ItemMinimize = No
  If ItemRunCode
    ItemRunCode = Yes
  Else
    ItemRunCode = No
  If (ItemType = 2)
  {
    ItemType = Checkbox
    ItemGroup = -
  }
  Else
    ItemType = Radio
  
  If ItemScriptCount Is Not Integer
    ItemScriptCount = 0
  Gui, ListView, LV_Items
  If (LV_GetCount() < ItemId)
    LV_Add("", ItemName, ItemWinTitle, ItemLoc, ItemType, ItemGroup, ItemIsDefault, ItemMinimize, ItemPriority, ItemRunCode, ItemScriptCount)
  Else
    LV_Modify(ItemID, "", ItemName, ItemWinTitle, ItemLoc, ItemType, ItemGroup, ItemIsDefault, ItemMinimize
    , ItemPriority, ItemRunCode, ItemScriptCount)
  LV_ModifyCol(1, "AutoHdr")
  LV_ModifyCol(2, "AutoHdr")
  LV_ModifyCol(3, "AutoHdr")
  LV_ModifyCol(4, "AutoHdr")
  LV_ModifyCol(8, "AutoHdr")
  LV_ModifyCol(10, "AutoHdr")
  ; Check for more than one Default in the Radio Group
  If (ItemGroup != "-" AND ItemIsDefault = "Yes")
  {
    Loop, % LV_GetCount()
    {
      If (A_Index != ItemID)
      {
        LV_GetText(tempGroup, A_Index, 5)
        If (tempGroup = ItemGroup)
        {
          LV_GetText(tempIsDefault, A_Index, 6)
          If (tempIsDefault = "Yes")
            Msgbox, 16, Error,
            (LTrim
            There are presently two Radio elements set as Default for Group %ItemGroup%.
            Please set only one to be the Default.
            ) 
        }
      }
    }
  
  }
  ; Set back to defaults
  GuiControl, , ItemName,
  GuiControl, , ItemWinTitle,
  GuiControl, , ItemLoc,
  GuiControl, , Radio, 1
  GuiControl, Enable, ItemGroup
  GuiControl, Choose, ItemGroup, 1
  GuiControl, , ItemIsDefault, 0
  GuiControl, , ItemMinimize, 0
  GuiControl, Choose, ItemPriority, 3
  GuiControl, , ItemRunCode, 0
  GuiControl, Disable, SelectRunCode
  GuiControl, , ScriptCountText, Script Count: 0
  ItemID := LV_GetCount() +1
  ItemEdit = 1
}
Return

RemoveSelected:
if (InStr(A_GuiControl,"Remove Selected") != 0)
{
  theLV = LV_Items
  ItemEdit = 1
}
Else
{
  theLV = LV_Groups
  GroupEdit = 1
}
Gui, ListView, %theLV%
Row := LV_GetNext()
If (Row1 != 0)
  LV_Delete(Row)
If (theLV = "LV_Groups")
{
  GroupID := LV_GetCount()
  ; Shift lines up if row was not last group
  If (Row <= GroupID)
  {
    Loop, %GroupID%
    {
      LV_Modify(A_Index, "Col1", A_Index)
    }
  }
  GroupID++
}
Else
  ItemID := LV_GetCount() + 1
Return

MoveSelected:
if (InStr(A_GuiControl,"Move Selected") != 0)
{
  StringReplace, Direction, A_GuiControl, Move%A_SPACE%Selected%A_SPACE%,
  theLV = LV_Items
  ItemEdit = 1
  ExcludedCols := ""
}
Else
{
  StringReplace, Direction, A_GuiControl, Move%A_SPACE%,
  theLV = LV_Groups
  GroupEdit = 1
  ExcludedCols = 1
}
Gui, ListView, %theLV%
Row1 := LV_GetNext()
If (Row1 != 0)
{
  If (Direction = "Up")
    Row2 := Row1 - 1
  Else
    Row2 := Row1 + 1
  SwitchLVRows(theLV, Row1, Row2, ExcludedCols)
}
Return

2GuiClose:
If (ItemEdit = 0 or ( A_GuiControl != "Save && Close" and (MsgBoxYesNo("You have made edits that have not been saved!`n"
      . "Would you like to save them?", 52, "Cancel Edits?") = 1) ))
{
  FileMove, opener.tmp, opener.ini, 1
}
Else
{
  FileDelete, opener.tmp
  GoSub, FinalizeItems
}
ItemEdit = 0
Gui, Destroy
Gui, 1:Default
Gui, Destroy
Loop, %Check0%
{
  Check%A_Index%Name := ""
  Check%A_Index%IsDefault := "" 
}
Check0 := ""
CBLabel := ""
i = 0
Loop, %RadioGroupCount%
{
  j = 0
  i++
  tempGroupName = Radio%i%
  count = %tempGroupName%_0
  count := %count%
  Loop, %count%
  {
    j++
    %tempGroupName%_%j%Name := ""
    %tempGroupName%_%j%IsDefault := ""
  }
  %tempGroupName%Cols := ""
  %tempGroupName%Label := ""
  %tempGroupName%_0 := ""
}
i := , j := , tempGroupName :=, string := "`nNew Build"
LogToFile(string)
GoSub, BuildMainGui
Return

FinalizeItems:
Gui, ListView, LV_Items
Items := LV_GetCount()
GroupList =
Loop, %Items%
{
  ItemID := A_Index
  LV_GetText(theItemName, ItemID, 1)
  LV_GetText(theItemWinTitle, ItemID, 2)
  LV_GetText(theItemLoc, ItemID, 3)
  LV_GetText(theItemType, ItemID, 4)
  LV_GetText(theItemGroup, ItemID, 5)
  LV_GetText(theItemIsDefault, ItemID, 6)
  LV_GetText(theItemMinimize, ItemID, 7)
  LV_GetText(theItemPriority, ItemID, 8)
  LV_GetText(theItemRunCode, ItemID, 9)
  LV_GetText(theItemScriptCount, ItemID, 10)
  
  string = TheItemGroup = %theItemGroup%
  LogToFile(string)
  If theItemGroup Not In %GroupList%
  {
    If (GroupList != "")
      GroupList .= ","
    If (theItemGroup = "-")
      GroupList .= "CB"
    Else
      GroupList .= theItemGroup
    string = %theItemGroup% added to GroupList |%GroupList%|
    LogToFile(string) 
  }
  
  IniWrite, %theItemName%, opener.ini, Control_%ItemID%, item_name
  IniWrite, %theItemWinTitle%, opener.ini, Control_%ItemID%, item_win_title
  IniWrite, %theItemLoc%, opener.ini, Control_%ItemID%, item_loc
  IniWrite, %theItemType%, opener.ini, Control_%ItemID%, item_type
  IniWrite, %theItemGroup%, opener.ini, Control_%ItemID%, item_group
  IniWrite, %theItemIsDefault%, opener.ini, Control_%ItemID%, item_is_default
  IniWrite, %theItemMinimize%, opener.ini, Control_%ItemID%, item_minimize
  IniWrite, %theItemPriority%, opener.ini, Control_%ItemID%, item_priority
  IniWrite, %theItemRunCode%, opener.ini, Control_%ItemID%, item_run_code
  If (theItemRunCode = "No")
    IniDeleteMatch("opener.ini", "Control_" . ItemID, "script_\d+")
  IniWrite, %theItemScriptCount%, opener.ini, Control_%ItemID%, item_script_count
}
IniWrite, %Items%, opener.ini, structure, control_count
CheckGroupStructure(GroupList)
theItemName := , theItemWinTitle := , theItemLoc := , theItemType := , theItemGroup :=
theItemIsDefault := , theItemMinimize := , theItemPriority := , theItemRunCode := , theItemScriptCount :=
Return

;     End "Opener" Gui and Functions
; --------------------------------------------------
; --------------------------------------------------
;                     Functions
; --------------------------------------------------
CheckGroupStructure(GroupList="")
{
  If (GroupList = "")
  {
    IniRead, ControlCount, opener.ini, structure, control_count, 0
    Loop, %ControlCount%
    {
      IniRead, theItemGroup, opener.ini, Control_%A_Index%, item_group, NotExistError
      string = ControlID = %A_Index%`nTheItemGroup = %theItemGroup%
      LogToFile(string)
      If (theItemGroup = "NotExistError")
        Continue
      If (theItemGroup = "-")
        theItemGroup = CB
      If theItemGroup Not In %GroupList%
      {
        If (GroupList != "")
          GroupList .= ","
        GroupList .= theItemGroup
        string = %theItemGroup% added to GroupList |%GroupList%|
        LogToFile(string) 
      }
    }
  }
  theGroupName =
  string = Checking for GroupList structure: |%GroupList%|
  LogToFile(string)
  Loop, Parse, GroupList, `,
  {
    LogToFile(A_LoopField)
    IniRead, theGroupName , opener.ini, structure, radio_group%A_LoopField%_name, NotExistError
    If (theGroupName = "NotExistError")
    {
      string = Group "%A_LoopField%" was not found assigned name      
      IniWrite, Group%A_LoopField%, opener.ini, structure, radio_group%A_LoopField%_name
      IniWrite, 1, opener.ini, structure, radio_group%A_LoopField%_cols
      If (A_LoopField = "CB")
      {
        IniWrite, Checkboxes, opener.ini, structure, radio_groupCB_name
        IniWrite, 1, opener.ini, structure, has_check_group
        IniWrite, 1, opener.ini, structure, radio_groupCB_cols
        string .= " Checkboxes, listed in 1 column"
      }
      Else
      {
        IniWrite, %A_LoopField%, opener.ini, structure, radio_group_count
        string .= " Group" . A_LoopField . ", listed in 1 column"
      }
      LogToFile(string)
    }
  }
}

SwitchLVRows(theLV, Row1, Row2, ExcludedCols)
{
  Gui, ListView, %theLV%
  Rows := LV_GetCount()
  Result = 1
  If (Row1 > 0 AND Row2 > 0 AND Rows >= Row1 AND Rows >= Row2)
  {
    Loop % LV_GetCount("Column")
    {
        If A_Index Not In %ExcludedCols%
        {
          LV_GetText(tempvar1, Row1, A_Index)
          LV_GetText(tempvar2, Row2, A_Index)
          LV_Modify(Row1, "Col". A_Index, tempvar2)
          LV_Modify(Row2, "Col". A_Index, tempvar1)
        }
    }
    Result = 0
    If (theLV = "LV_Items")
    {
      Loop, 2
      {
        file = opener.ini
        ItemID := Row%A_Index%
        string = ItemID = %ItemID%
        LogToFile(string)
        IniRead, %ItemID%ScriptCount, opener.ini, Control_%ItemID%,item_script_count, --
        If (%ItemID%ScriptCount = "--") ; Script has not been edited yet
        {
          string := ItemID . "ScriptCount = " . %ItemID%ScriptCount
          IniRead, %ItemID%ScriptCount, opener.tmp, Control_%ItemID%,item_script_count, 0
          file = opener.tmp
          string .= "`nIniRead, " . ItemID . "ScriptCount, opener.tmp, Control_" . ItemID . ",item_script_count, 0`n" . %ItemID%ScriptCount
          LogToFile(string)
        }
        Loop, % %ItemID%ScriptCount
        {
          IniRead, %ItemID%Script%A_Index%, %file%, Control_%ItemID%, script_%A_Index%
          string := "file = " . file . "`nIniRead, " . ItemID . "Script" . A_Index . ", " . file . ", Control_" . ItemID . ", script_"
          . A_Index . "`n" . %ItemID%Script%A_Index%
          LogToFile(string)
          If (file = "opener.ini")
            IniDelete, %file%, Control_%ItemID%, script_%A_Index%
        }
      }
      Loop, 2
      {
        OldID := Row%A_Index%
        If (A_Index = 1)
          ItemID := Row2
        Else
          ItemID := Row1
        IniWrite, % %OldID%ScriptCount, opener.ini, Control_%ItemID%, item_script_count
        Loop, % %OldID%ScriptCount
          IniWrite, % %OldID%Script%A_Index%, opener.ini, Control_%ItemID%, script_%A_Index%
      }
    }
  }
  Return %Result%
}
MsgBoxOKCancel(Text, Title = "", Timeout = "" )
{ ; Return 0 on Cancel, 1 on OK, -1 on Timeout
  MsgBox, 257, %Title%, %Text%, %Timeout%
  IfMsgBox Cancel
    Return 0
  IfMsgBox OK
    Return 1
  IfMsgBox Timeout
    Return -1
}
MsgBoxYesNo(Text, Title = "", Timeout = "" )
{ ; Return 0 on No, 1 on OK, -1 on Timeout
  MsgBox, 4, %Title%, %Text%, %Timeout%
  IfMsgBox No
    Return 0
  IfMsgBox Yes
    Return 1
  IfMsgBox Timeout
    Return -1
}
WinExist(title)
{
  IfWinExist, %title%
    Return 1
  Else
    Return 0
}
StartApp(loc, title = "", minwin = "", prioritystatus = "")
{
  If (title != "" AND WinExist(title))
  {
    WinActivate, %title%
  }
  else
  {
    IfInString, loc, \
    {
      RegExMatch(loc, "(.*)\\(.*)", loc)
      Run, %loc1%\%loc2%, %loc1%, %minwin%, NewPID
    }
    Else
      Run, %loc%, , %minwin%, NewPID
      
    If NewPID
      Process, Priority, %NewPID%, %prioritystatus%
    Sleep, 500
  }
}
;if (program = "excel.lnk")
;{
;  Run, C:\Program Files\Microsoft Office\OFFICE11\excel.exe "%A_MyDocuments%\PT stats\BankRoll07.xls"
;  WinWait Security Warning
;  Send, {RIGHT}{ENTER}
;}

LoadData(ItemID, CheckForNone = 0)
{ ; Return 0 on failure, 1 on success, -1 on Item was None (can only happen if CheckForNone is not 0)
  IniRead, Name, opener.ini, Control_%ItemID%, item_name, Failed to read file name.
  IniRead, WinTitle, opener.ini, Control_%ItemID%, item_win_title, --
  IniRead, Location, opener.ini, Control_%ItemID%, item_loc, Failed to read file location.
  IniRead, Minimize, opener.ini, Control_%ItemID%, item_minimize, --
  IniRead, Priority, opener.ini, Control_%ItemID%, item_priority, --
  IniRead, RunCode, opener.ini, Control_%ItemID%, item_run_code, --
  string = ItemID = %ItemID%`nCheckForNone = %CheckForNone%`nLocation = %Location%`nWinTitle = %WinTitle%
  LogToFile(string)
    If (CheckForNone AND Location = "" AND WinTitle = "None")
    Return -1
  If (Minimize = "Yes")
    Minimize = Min
  If !CheckAndRun(Location, Name, WinTitle, Minimize, Priority)
    Return 0
  If (RunCode = "Yes")
  {
    IniRead, ScriptCount, opener.ini, Control_%ItemID%, item_script_count, 0
    string = %A_Space%%A_Space%ScriptCount = %ScriptCount%`n
    LogToFile(string)
    Loop, %ScriptCount%
    {
      IniRead, ScriptLoc, opener.ini, Control_%ItemID%, script_%A_Index%, Failed to read script location.
      string = %A_Space%%A_Space%ScriptID = script_%A_Index%`n  ScriptLoc = %ScriptLoc%
      LogToFile(string)
      If !CheckAndRun(ScriptLoc, Name)
        Return 0
    }
  }
  Return 1
}
CheckAndRun(loc, Name, title = "", minwin = "", prioritystatus = "")
{ ; Return 0 on failure, 1 on success, 2 on ignore error 
  Result = 1
  IfExist, %loc%
    StartApp(loc, title, minwin, prioritystatus)
  Else
  {
    string = ScriptLoc Not Found
    LogToFile(string)
    If (MsgBoxOKCancel("Error: File not found for " . Name . "`nAttempted to launch:`n"
        . loc . "`n`nPress OK to continue launching other items or`nCancel to edit settings."
        , "Error") = 1)
    {
      Result = 2
      string = Ignore error.
      LogToFile(string)
    }
    Else
    {
      Result = 0
      string = Return to gui.
      LogToFile(string)
    }
  }
  Return %Result%
}
LogToFile(string)
{
  global logging
  If logging
    FileAppend, %string%`n, Log.txt
}
; --------------------------------------------------
;               Functions by others
; --------------------------------------------------
GetTextSize(pStr, pFont="", pHeight=false, pAdd=0) { ; <By.majkinetor>
  local height, weight, italic, underline, strikeout , nCharSet
  local hdc := DllCall("GetDC", "Uint", 0)
  local hFont, hOldFont
  local resW, resH, SIZE

  ;parse font
  italic      := InStr(pFont, "italic")    ?  1   :  0
  underline   := InStr(pFont, "underline") ?  1   :  0
  strikeout   := InStr(pFont, "strikeout") ?  1   :  0
  weight      := InStr(pFont, "bold")      ? 700  : 400

  ;height
  RegExMatch(pFont, "(?<=[S|s])(\d{1,2})(?=[ ,])", height)
  if (height = "")
    height := 10

  RegRead, LogPixels, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI, LogPixels
  Height := -DllCall("MulDiv", "int", Height, "int", LogPixels, "int", 72)
  ;face
  RegExMatch(pFont, "(?<=,).+", fontFace)   
  if (fontFace != "")
    fontFace := RegExReplace( fontFace, "(^\s*)|(\s*$)")      ;trim
  else fontFace := "MS Sans Serif"

  ;create font
  hFont   := DllCall("CreateFont", "int", height, "int", 0, "int", 0, "int", 0
                        , "int",  weight,   "Uint", italic,   "Uint", underline,"uint", strikeOut
                        , "Uint", nCharSet, "Uint", 0, "Uint", 0, "Uint", 0, "Uint", 0, "str", fontFace)
  hOldFont := DllCall("SelectObject", "Uint", hDC, "Uint", hFont)                               

  VarSetCapacity(SIZE, 16)
  curW=0
  Loop,  parse, pStr, `n
  {
    DllCall("DrawTextA", "Uint", hDC, "str", A_LoopField, "int", StrLen(pStr), "uint", &SIZE, "uint", 0x400)
    resW := NumGet(SIZE, 8)
    curW := resW > curW ? resW : curW
  }
  DllCall("DrawTextA", "Uint", hDC, "str", pStr, "int", StrLen(pStr), "uint", &SIZE, "uint", 0x400)
  ;clean   
  DllCall("SelectObject", "Uint", hDC, "Uint", hOldFont)
  DllCall("DeleteObject", "Uint", hFont)
  DllCall("ReleaseDC", "Uint", 0, "Uint", hDC)

  resW := NumGet(SIZE, 8) + pAdd
  resH := NumGet(SIZE, 12) + pAdd

  if (pHeight)
    resW = W%resW% H%resH%
  return %resW%
}
Anchor(c, a, r = false) { ; v3.5.1 - Titan
	static d
	GuiControlGet, p, Pos, %c%
	If !A_Gui or ErrorLevel
		Return
	i = x.w.y.h./.7.%A_GuiWidth%.%A_GuiHeight%.`n%A_Gui%:%c%=
	StringSplit, i, i, .
	d .= (n := !InStr(d, i9)) ? i9 :
	Loop, 4
		x := A_Index, j := i%x%, i6 += x = 3
		, k := !RegExMatch(a, j . "([\d.]+)", v) + (v1 ? v1 : 0)
		, e := p%j% - i%i6% * k, d .= n ? e . i5 : ""
		, RegExMatch(d, RegExReplace(i9, "([[\\\^\$\.\|\?\*\+\(\)])", "\$1")
		. "(?:([\d.\-]+)/){" . x . "}", v)
		, l .= InStr(a, j) ? j . v1 + i%i6% * k : ""
	r := r ? "Draw" :
	GuiControl, Move%r%, %c%, %l%
}
IniKeyGet(File,Sect,Array)
{
  Global
  Local i := 0, LineNum := 0, KeyName0, KeyName1, KeyName2, LL, Section, LineCont, ErrLvl
  Loop, Read, %File%
  {
    LineNum ++
    Section = [%Sect%]
    If A_LoopReadLine = %Section%
    {
      LineNum++
      Loop
      {
        FileReadLine, LineCont, %File%, %LineNum%
        ;Check is line may be a section, not a key name
        If (ErrorLevel OR SubStr(LineCont, 1, 1) = "[")
        {
          ;Declare Array0 Value
          %Array%0 := i
          Return i
        }
        ;Line not a key
        If LineCont Not Contains =
        {   
          LineNum++
          Continue
        }
        i++
        StringSplit, KeyName, LineCont, =
        %Array%%i% := KeyName1
        LineNum++
      }
    }
  }
}
IniSectionGet(File,Array)
{
   Global
   Local L, R, Econt, i = 0  ;Index used for array element number
   Loop, Read, %File%
   {
      StringLeft, L, A_LoopReadLine, 1
      ;Possible Section name, so check right side
      If L = [
      {
         StringRight, R, A_LoopReadLine, 1
         ;If its a right bracket Section found
         If R = ]
         {
            i++
            ;Econt = Element Contents
            ECont = %A_LoopReadLine%
            StringTrimLeft, ECont, ECont, 1
            StringTrimRight, ECont, ECont, 1
            %Array%%i% = %ECont%
         }
      }
   }
   %Array%0 = %i%
}
IniDeleteMatch(File, Sect, Key="", Array="TheArray")
{
  Global
  Local tempvar, i := 0
  If (Key != "") ; Delete keys that match Key in Sect
  {
    IniKeyGet(File,Sect,Array)
    Loop, % %Array%0
    {
      If (RegExMatch(%Array%%A_Index%,Key))
      {
        tempvar := %Array%%A_Index%, i++
        IniDelete, %File%, %Sect%, %tempvar%
      }
    }
  }
  Else ; Delete sections that match Sect
  {
    IniSectionGet(File,Array)
    Loop, % %Array%0
    {
      If (RegExMatch(%Array%%A_Index%,Sect))
      {
        tempvar := %Array%%A_Index%, i++
        IniDelete, %File%, %tempvar%
      }
    }
  }
  Loop, % %Array%0
    %Array%%A_Index% :=
  %Array%0 :=
  Return i
}
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 01:22 AM
@ Anon - 's always
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 09:48 AM
Dave,

The Bet-Pot script does not work at crypto after a software update they did a week ago. Any chance you could look into it?
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 09:08 PM
FOZZY, look into BoDog table/card mods lol

no1 wants to watch my vids w/o them
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 09:12 PM
No chance, sorry. I can't do all the FTP/Stars mods I am planning on.
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 11:41 PM
obv lol ... didn't think u would
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 11:44 PM
Quote:
Originally Posted by P1zza_Man
obv lol ... didn't think u would
Making more playin poker lately.
Quick Questions &amp; Answers Thread Quote
04-12-2008 , 11:57 PM
Quote:
Originally Posted by fozzy71
Making more playin poker lately.
thats good ... u are at 50nl full time now right?
Quick Questions &amp; Answers Thread Quote

      
m