Skip to content

Commit

Permalink
* Project's exe custom icon path is now saved to PMC file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pulover committed Nov 9, 2020
1 parent 817b4ae commit fc1be6f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions Documentation/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ chosen1ft for fixing the mixing rows bug when saving a project.

## Version 5.3.5
* Updated max value for *Pause (Sleep)* command.
* Project's exe custom icon path is now saved to PMC file.
* Fixed bugs with objects and strings inside objects.
* Fixed small bugs.

Expand Down
13 changes: 9 additions & 4 deletions LIB/Class_PMC.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@
local ID := 0, Col, Row := [], Opt := []

this.PmcCode := [], this.PmcGroups := [], this.PmcContexts := []
IfDirectContext := "None", IfDirectWindow := ""
Loop, Read, %FileName%
{
If (RegExMatch(A_LoopReadLine, "\[PMC Code(\sv)*(.*)\]", v)=1)
If (InStr(A_LoopReadLine, "[PMC Globals]")=1)
{
RegExMatch(SubStr(A_LoopReadLine, 14), "O)\|([^\|]*)\|?([^\|]*)\|?(.*)", MGlobals)
IfDirectContext := MGlobals[1], IfDirectWindow := MGlobals[2]
, ExpIcon := MGlobals[3]
}
Else If (RegExMatch(A_LoopReadLine, "\[PMC Code(\sv)*(.*)\]", v)=1)
{
ID++, Row := [], Opt := [], Version := v2
Loop, Parse, A_LoopReadLine, |
Expand All @@ -21,10 +28,7 @@
RegExMatch(SubStr(A_LoopReadLine, 9), "O)(\w+)\|([^\|]*)\|?([^\|]*)\|?([^\|]*)", MContext)
this.PmcContexts.Push({"Condition": MContext[1] != "" ? MContext[1] : "None", "Context": MContext[2]})
If (MContext[3] != "")
{
IfDirectContext := MContext[3], IfDirectWindow := MContext[4]
GuiControl, 1:, ContextTip, Global <a>#If</a>: %IfDirectContext%
}
}
Else If (InStr(A_LoopReadLine, "Groups=")=1)
this.PmcGroups[ID] := SubStr(A_LoopReadLine, 8)
Expand All @@ -38,6 +42,7 @@
Else If (Trim(A_LoopReadLine) = "")
this.PmcCode[ID] := {Opt: Opt, Row: Row, Version: Version}
}
GuiControl, 1:, ContextTip, Global <a>#If</a>: %IfDirectContext%
If (!IsObject(this.PmcCode[ID].opt))
this.PmcCode[ID] := {Opt: Opt, Row: Row, Version: Version}
If (ID = 0)
Expand Down
3 changes: 2 additions & 1 deletion LIB/Internal.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -1464,12 +1464,13 @@ SaveProject(FileName)
{
local All_Data

All_Data := "[PMC Globals]|" IfDirectContext "|" IfDirectWindow "|" ExpIcon "`n"
Loop, %TabCount%
{
PMCSet := "[PMC Code v" CurrentVersion "]|" o_AutoKey[A_Index]
. "|" o_ManKey[A_Index] "|" o_TimesG[A_Index]
. "|" CoordMouse "," TitleMatch "," TitleSpeed "," HiddenWin "," HiddenText "," KeyMode "," KeyDelay "," MouseDelay "," ControlDelay "|" OnFinishCode "|" CopyMenuLabels[A_Index] "`n"
IfContext := "Context=" o_MacroContext[A_Index].Condition "|" o_MacroContext[A_Index].Context "|" IfDirectContext "|" IfDirectWindow "`n"
IfContext := "Context=" o_MacroContext[A_Index].Condition "|" o_MacroContext[A_Index].Context "`n"
TabGroups := "Groups=" LVManager[A_Index].GetGroups() "`n"
LV_Data := PMCSet . IfContext . TabGroups . PMC.LVGet("InputList" A_Index).Text . "`n"
All_Data .= LV_Data
Expand Down
5 changes: 3 additions & 2 deletions MacroCreator.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ IfExist %ThisListFile%
PMCSet := "[PMC Code v" CurrentVersion "]|" o_AutoKey[A_List]
. "|" o_ManKey[A_List] "|" o_TimesG[A_List]
. "|" CoordMouse "," TitleMatch "," TitleSpeed "," HiddenWin "," HiddenText "," KeyMode "," KeyDelay "," MouseDelay "," ControlDelay "|" OnFinishCode "|" CopyMenuLabels[A_List] "`n"
IfContext := "Context=" o_MacroContext[A_List].Condition "|" o_MacroContext[A_List].Context "|" IfDirectContext "|" IfDirectWindow "`n"
IfContext := "Context=" o_MacroContext[A_List].Condition "|" o_MacroContext[A_List].Context "`n"
TabGroups := "Groups=" LVManager[A_List].GetGroups() "`n"
LV_Data := PMCSet . IfContext . TabGroups . PMC.LVGet("InputList" A_List).Text . "`n"
FileAppend, %LV_Data%, %ThisListFile%
Expand Down Expand Up @@ -2886,6 +2886,7 @@ Header := Script_Header()
If (Ex_UV = 1)
Header .= UserVarsList "`n"
RowNumber := 0, AutoKey := "", IncList := "", ProgRatio := 100 / LV_GetCount(), HasEmailFunc := {}
PmcCode := "[PMC Globals]|" IfDirectContext "|" IfDirectWindow "|" ExpIcon "`n"
Loop, % LV_GetCount()
{
GuiControl, 14:, ExpProgress, +%ProgRatio%
Expand Down Expand Up @@ -2915,7 +2916,7 @@ Loop, % LV_GetCount()
PMCSet := "[PMC Code v" CurrentVersion "]|" Ex_AutoKey
. "|" o_ManKey[Ex_Idx] "|" Ex_TimesX
. "|" CoordMouse "," TitleMatch "," TitleSpeed "," HiddenWin "," HiddenText "," KeyMode "," KeyDelay "," MouseDelay "," ControlDelay "|" OnFinishCode "|" CopyMenuLabels[Ex_Idx] "`n"
IfContext := "Context=" o_MacroContext[Ex_Idx].Condition "|" o_MacroContext[Ex_Idx].Context "|" IfDirectContext "|" IfDirectWindow "`n"
IfContext := "Context=" o_MacroContext[Ex_Idx].Condition "|" o_MacroContext[Ex_Idx].Context "`n"
TabGroups := "Groups=" LVManager[Ex_Idx].GetGroups() "`n"
PmcCode .= PMCSet . IfContext . TabGroups . PMC.LVGet("InputList" Ex_Idx).Text . "`n"
If (Ex_IN)
Expand Down

0 comments on commit fc1be6f

Please sign in to comment.