Would You care to share that macro Morten?Morten Lerager wrote: ↑07 Feb 2022, 19:45Another approach using a macro.
https://youtu.be/nwLST-FLPo0
Starnet v2 Call with Macro
Re: Starnet v2
/Rudi
- Morten Lerager
- Posts: 69
- Joined: 08 Oct 2021, 14:53
- Location: Denmark
Re: Starnet v2
Oh, sorry Rudi. As soon I get home from my work
The Macro is a little funny. I must be blind, can't find a command for copy and deleting file.
So there are a lot of fussy workaround.
If you know the syntax for copy or delete please share.
Or if any can write it, some less confusing, let me know.
Only run in AA8 SP1
The Macro is a little funny. I must be blind, can't find a command for copy and deleting file.
So there are a lot of fussy workaround.
If you know the syntax for copy or delete please share.
Or if any can write it, some less confusing, let me know.
Only run in AA8 SP1
Code: Select all
' StarnetV2
' Inviroment: Macro AA8 SP1
' Tested on Windows 11
' 07-02-2022 Morten Lerager
'
' *** Init ***
' Path to Starnet install dir
Starnet = "C:\Users\morte\Documents\AA8\StarNetv2CLI_Win\"
' Tiles: Lower value = better removement, slower performens
' Chould be change to user Input
Tiles = "256"
'
InName=Image.FileNameWithPath
MyPath = ExtractPath(InName)
ImageName = Image.FileName
' Chek Input file
If Right(ImageName,3)<>"tif" and Right(ImageName,4)<>"tiff" then
message("Image has to be in 16 bit Tif format")
END
endif
' Put the Image in Starnet folder
CMD="Robocopy " + MyPath + " " + starnet + " " + ImageName
System.Execute(CMD)
' Delete Starless if found
FileExists = findfile$(starnet,"Starless_" + ImageName)
If FileExists <>"" then ' Delete before run
savetext$("Del "+ starnet + "Starless_" + ImageName , Starnet + "ImageDelete.cmd")
CMD=Starnet+"ImageDelete.cmd"
System.Execute(CMD)
endif
' Running Starnet
savetext$("Pause"+crlf()+"pushd "+Starnet+crlf()+"Pause"+crlf()+"starnet++.exe "+ImageName+" Starless_"+ImageName+" "+Tiles+crlf()+"Pause"+crlf()+"popd",Starnet+"Starnet.cmd")
CMD=Starnet+"Starnet.cmd"
System.Execute(CMD)
' Wait for Starnet Finish
FileExists=""
while FileExists=""
pause(10)
FileExists = findfile$(starnet,"Starless_" + ImageName)
endwhile
' Open the StarLess Image
Image.Open(Starnet+"Starless_"+ImageName)
' Save it in Home folder
Image.Save(MyPath+"Starless_"+ImageName)
' Close active Image
Image.Close
' Open it from Home folder
Image.Open(MyPath+"Starless_"+ImageName)
' Delete the Image in Starnet folder
savetext$("Del "+ starnet + ImageName+crlf(),Starnet+"ImageDelete.cmd")
AppendText("Del "+ starnet + "Starless_" + ImageName , Starnet + "ImageDelete.cmd")
CMD=Starnet+"ImageDelete.cmd"
System.Execute(CMD)
END
function ExtractPath(s)
return Mid(s, 1, InStrRev(s,"\"))
end function
HEQ5 Pro 150PDS 60mm guide. Asiair.
Asi294mc. AA8.
Asi294mc. AA8.
Re: Starnet v2 Call with Macro
An updated plugin for version 2.0 is available as well, so there's no longer need to rename the executable:
Download at: https://www.msb-astroart.com/
Download at: https://www.msb-astroart.com/
- Morten Lerager
- Posts: 69
- Joined: 08 Oct 2021, 14:53
- Location: Denmark