Skip to content

Commit

Permalink
Fixed dynamic web fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
EnhancedJax committed Jan 9, 2022
1 parent a0d238e commit 82102b4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
32 changes: 20 additions & 12 deletions @Start/DownloadFile/Parsed.inc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ Container=BC
H=#Sec.H#
W=#Sec.L#
PreserveAspectRatio=2
Leftmouseupaction=[!Refresh]
ImageName=#ROOTCONFIG#.png

[Esc]
Expand Down Expand Up @@ -136,7 +135,7 @@ MeterStyle=String:S

[Des]
Meter=String
Text=Here you can find the list of dependencies. Click on any one of them to install, make sure you are connected to the internet. Refresh this page by clicking on the right.
Text=Here you can find the list of dependencies. Click on any one of them to install, make sure you are connected to the internet.
W=(#SEc.W#-#Sec.L#-#Sec.P#*2)
clipString=2
MeterStyle=String:S
Expand All @@ -150,7 +149,7 @@ Y=20R
MEterStyle=Dep.Shape:S
[DepText1]
Meter=String
Text=JaxCore3 // Checking...
Text=JaxCore // Checking...
MeterStyle=Dep.Text:S

[Dep3]
Expand Down Expand Up @@ -199,12 +198,19 @@ Group=Button
; ---------------------------------------------------------------------------- ;

[WebParser]
Measure=WebParser
URL=https://raw.githubusercontent.com/Jax-Core/JaxCore/main/%40Resources/Version.inc
RegExp==(.*)$
FinishAction=[!Delay 1000][!CommandMeasure LogicalScript "check()"]
Measure=Calc
Formula=40000
;URL=https://raw.githubusercontent.com/Jax-Core/JaxCore/main/%40Resources/Version.inc
;RegExp==(.*)$
OnUpdateAction=[!Delay 1000][!CommandMeasure LogicalScript "check()"]
OnConnectionErrorAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "//Failed to connect to JaxCore github, if this is an issue please report to me"][!UpdateMEter *][!Redraw]
OnRegExpErrorAction=[!Log Developer:RegExpFalse]
Disabled=1

[WebParserCheck]
Measure=Calc
IfCondition=#Parsed# = 1
IfTrueAction=[!EnableMeasure WebParser][!UpdateMeasure WebParser][!CommandMeasure WebParser "Reset"]

[InternetStatus]
Measure=PLUGIN
Expand All @@ -214,9 +220,11 @@ IfCondition=InternetStatus = -1
ifTrueaction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "JaxCore // connection error, please check internet connection"][!UpdateMEter *][!Redraw]

[mVer]
Measure=WebParser
URL=[WebParser]
StringIndex=1
Measure=Calc
Formula=40000
;Measure=WebParser
;URL=[WebParser]
;StringIndex=1

[LogicalScript]
Measure=Script
Expand All @@ -226,10 +234,10 @@ ScriptFile=Logic.lua
Measure=String
Group=NUOL
Disabled=1
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeYes:S"][!SetOption DepText1 Text "JaxCore3 // v#Core.Ver# installed"][!ShowMeterGroup Button][!UpdateMEter *][!Redraw]
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeYes:S"][!SetOption DepText1 Text "JaxCore // v#Core.Ver# installed"][!ShowMeterGroup Button][!UpdateMEter *][!Redraw]

[JaxCoreNo]
Measure=String
Group=NUOL
Disabled=1
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "JaxCore3 // click here to install"][!SetOption Dep1 Leftmouseupaction """["#@#Actions\AHKv1.exe" "#@#Actions\Installer.ahk"][!SetOption DepText1 Text "JaxCore3 // download here if it doesn't automatically install"][!SetOption Dep1 Leftmouseupaction """["https://github.com/Jax-Core/JaxCore/releases/latest"][!UpdateMEter *][!Redraw]"""][!UpdateMEter *][!Redraw]"""][!UpdateMEter *][!Redraw]
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "JaxCore // click here to install"][!SetOption Dep1 Leftmouseupaction """["#@#Actions\AHKv1.exe" "#@#Actions\Installer.ahk"][!SetOption DepText1 Text "JaxCore // download here if it doesn't automatically install"][!SetOption Dep1 Leftmouseupaction """["https://github.com/Jax-Core/JaxCore/releases/latest"][!UpdateMEter *][!Redraw]"""][!UpdateMEter *][!Redraw]"""][!UpdateMEter *][!Redraw]
8 changes: 4 additions & 4 deletions @Start/Main.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Parsed=0
Measure=String
String=#Parsed#
IFmatch=0
IfMatchaction=[!WriteKeyValue Variables Parsed 1][!Delay 100][!Refresh]
IfMatchaction=[!WriteKeyValue Variables Parsed 1][!Delay 1000][!Refresh]
IfNotMatchAction=[!WriteKeyValue Variables Parsed 0]

[GetStart]
Measure=WebParser
URL=https://raw.githubusercontent.com/Jax-Core/JaxCore/main/Core/Start/Main.inc
Download=1
DownloadFile=Parsed.inc
URL=https://raw.githubusercontent.com/Jax-Core/JaxCore/main/CoreShell/Start/Main.inc
Debug=2
Debug2File=DownloadFile\Parsed.inc

[DummyString]
Meter=String
Expand Down

0 comments on commit 82102b4

Please sign in to comment.