Skip to content

Commit

Permalink
Auto Mirror 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyduckAR committed Sep 28, 2021
1 parent c7281df commit 196f1e8
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 20 deletions.
Binary file removed Auto Mirror V1.0.0.zip
Binary file not shown.
Binary file added Auto Mirror V1.0.2.zip
Binary file not shown.
113 changes: 93 additions & 20 deletions Auto Mirror.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@
SetBatchLines, -1
OnExit, OnExit

SetWorkingDir %A_ScriptDir%
; Include the Neutron library
#Include <Neutron>
#Include <tf>




global helpindex:=1
global version:="1.0.2"

; Create a new NeutronWindow and navigate to our HTML page
neutron := new NeutronWindow()
neutron.Load("login/login.html")
;for i, elem in neutron.Each(neutron.qsa(".neutron"));
; elem.classList.remove("neutron")



neutron.Gui("+LabelNeutron")



neutron.Show("w450 h850")
neutron.Show("w450 h860")
return

; FileInstall all your dependencies, but put the FileInstall lines somewhere
Expand Down Expand Up @@ -90,11 +85,41 @@ return

startup(neutron)
{
IfNotExist, Mirror\version.ini
{
msgbox,,,Core Missing Self Deploy Started,1
url := "https://github.com/Genymobile/scrcpy/releases/download/v1.19/scrcpy-win64-v1.19.zip"

Download("Core.zip", url)
zipname=Core.zip
zipFolder=%A_ScriptDir%\Mirror
SmartZip(zipname,zipFolder)
FileDelete,%A_ScriptDir%\Core.zip
IniWrite, 1.19, Mirror\version.ini, version, my
; IniWrite, Pairs, Mirror\version.ini, Section
}
IfExist, Mirror\version.ini
{
IniRead, myvekr, Mirror\version.ini,version,my
; msgbox, %myvekr%
if (myvekr!= 1.19)
{
msgbox,,,Core Missing Self Deploy Started,1
url := "https://github.com/Genymobile/scrcpy/releases/download/v1.19/scrcpy-win64-v1.19.zip"

Download("Core.zip", url)
zipname=Core.zip
zipFolder=%A_ScriptDir%\Mirror
SmartZip(zipname,zipFolder)
FileDelete,%A_ScriptDir%\Core.zip
IniWrite, 1.19, Mirror\version.ini, version, my
}
}
;check Core
IfNotExist, Mirror\adb.exe
{
msgbox,,,Core Missing Self Deploy Started,2
url := "https://github.com/Genymobile/scrcpy/releases/download/v1.17/scrcpy-win64-v1.17.zip"
url := "https://github.com/Genymobile/scrcpy/releases/download/v1.19/scrcpy-win64-v1.19.zip"

Download("Core.zip", url)
zipname=Core.zip
Expand All @@ -103,7 +128,12 @@ startup(neutron)
FileDelete,%A_ScriptDir%\Core.zip
}


IfNotExist, Mirror\ip.bat
{
url := "https://raw.githubusercontent.com/DizzyduckAR/AutoMirror/master/lib/ip.bat"

Download("Mirror/ip.bat", url)
}

test := neutron.doc.getElementById("mainselect")
test2 := neutron.doc.createElement("option")
Expand All @@ -120,6 +150,52 @@ startup(neutron)
test.add(test2)
}

helpbtnn(neutron)
{
helpindex:=helpindex+1

if (helpindex=2)
{
neutron.doc.getElementById("helpname").innerHTML := "Developer mode unlock"
neutron.doc.getElementById("helpimg").src:="https://raw.githubusercontent.com/DizzyduckAR/AutoMirror/master/HelpGifs/DevMode.gif"
return

}

if (helpindex>=3)
{
helpindex:=3
neutron.doc.getElementById("helpname").innerHTML := "Connect Phone"
neutron.doc.getElementById("helpimg").src:="https://raw.githubusercontent.com/DizzyduckAR/AutoMirror/master/HelpGifs/phone2pc.png"
return
}

;msgbox,next index %helpindex%
}

helpbtnb(neutron)
{
helpindex:=helpindex-1
if (helpindex=2)
{
neutron.doc.getElementById("helpname").innerHTML := "Developer mode unlock"
neutron.doc.getElementById("helpimg").src:="https://raw.githubusercontent.com/DizzyduckAR/AutoMirror/master/HelpGifs/DevMode.gif"
return

}

if (helpindex<=1)
{
neutron.doc.getElementById("helpname").innerHTML := "RSA Allow"
neutron.doc.getElementById("helpimg").src := "https://raw.githubusercontent.com/DizzyduckAR/AutoMirror/master/HelpGifs/RSA.png"
helpindex:=1
return
}
;msgbox,back index %helpindex%

}


lcdon(neutron)
{
menuChoicename := neutron.doc.getElementById("mainselect2").value
Expand Down Expand Up @@ -217,12 +293,7 @@ connectip(neutron)
barstate +=0
neutronjswrap("botststusbar","progbar",barstate "%",neutron)
menuChoicetmp3 := neutron.doc.getElementById("targetname").value
;msgbox,%menuChoicetmp3%
buildname := "adb connect " menuChoicetmp3 ":5555"
;msgbox,%buildname%
;runwait %comspec% /c Mirror\adb.exe %buildname%
;RunWait, %comspec% /c Mirror\adb.exe %buildname%
;Send, %buildname%{enter}
FileDelete, Mirror\connect.bat
FileAppend,
(
Expand Down Expand Up @@ -410,7 +481,8 @@ neutronjswrap(element,mode,var,neutron)

SetTitle(neutron)
{
neutron.doc.getElementById("titlebar123").innerHTML := "Auto Mirror"

neutron.doc.getElementById("titlebar123").innerHTML := "Auto Mirror V" version

}

Expand All @@ -425,17 +497,18 @@ Neutron(neutron, event)
;MsgBox, % "You clicked: " event.target.innerText
}

Website(neutron, event)
arazu(neutron, event)
{
; event.target will contain the HTML Element that fired the event.
; Show a message box with its inner text.
discord := "https://discord.gg/ggRCXS2"
run,%discord%
Neutron := "https://github.com/DizzyduckAR"
run,%Neutron%
;MsgBox, % "You clicked: " event.target.innerText
}




AnimatedGifControl(GuiNameOrHwnd, GifFilePath, ControlOptions="") {
Static
Static CallCount := 0
Expand Down
Binary file removed AutoMirror Source.rar
Binary file not shown.

0 comments on commit 196f1e8

Please sign in to comment.