Добро пожаловать, Гость
Пожалуйста Вход или Регистрация.    Забыли пароль?

On-Grid Booster Project Vs 3.5
(0 чел.) 
ВнизСтраница: 12345678...32
Сообщения темы: On-Grid Booster Project Vs 3.5
*
#46195
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 34
Never did that. I always had the AHK write to the shared drive. Why would you want to write the ini return value for EP to a place other than the local drive?
innominate
Gold Boarder
Постов: 642
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#46196
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 10
Thanks you two. Just got it.

EP is looking only in the script folder for EPresults. so read/write the EPresults to here : \OGCrystalImages\OGCrystalVars.ini|EPControl|EPResult

AHK can look anywhere for other information, so read/write stuff here too: Z:\EPData\EP Shared Variables\
Minesalot
Expert Boarder
Постов: 236
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#46197
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 10
Just thought of an issue.

With survey scan enabled. How is that going to be handled with 3 different roids? Do we check the 3 rocks we want to mine in EP, or is it supposed to scan for the rocks currently in the overview?

Nevermind, Slav you are brilliant. My code runs just before scanning, and what ever roids are in overview is what gets counted.
Minesalot
Expert Boarder
Постов: 236
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Последнее редактирование: 29.05.2017 03:53 Редактировал Minesalot.
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#46202
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 10
Working on a method to sense roid types in overview and confirm things. Instead of imagesearching for "Nothing Found".

ScanOverview function looks promising. It spits out this to the ini.

Код:


[ScanOverview]
     RoidDistance=11000|12000|12000|12000|12000|13000|13000|14000|14000|15000|17000|20000|24000
     RoidName=Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Rich|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure
     RoidType=NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage



How would I go about reading the ini for RoidName, and checking it against the current crystal set?
[Crystal]
Primary=Plagioclase
Secondary=Pyroxeres
Tertiary=Scordite

Looks like it grabs the first 5 characters of the name and then puts a |

-I would have to iniread that line
-search for the first 5 characters of Primary if it appears at all.
-if it does not, I would then need to search for the other 5% and 10% version of each name. That could get quite big on the code

I may be complicating things though.
-If I just changed crystal types to primary settings and ScanOverview find roids, no need to do anything.
-If ScanOverview is empty run crystal change ahk

And btw ScanOveriew will come in handy on a few other things too.

Nevermind, found a bit of code that will help a lot. going to make some changes to a few things.

Код:


Name := "Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Rich|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Azure||"

Type := "ContainerWhite|ContainerWhite|ContainerWhite|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage"

NameCount := % HowOftenIs(Name,"Asteroid")
TypeCount := % HowOftenIs(Type,"ContainerWhite")
msgbox, % Primary " : " NameCount " | Container : " TypeCount
ExitApp

HowOftenIs(Haystack,Needle)
{
  count = 0
  pos = 0
  Loop,
  {
    StringGetPos, pos, Haystack, %Needle%,, %pos%    
    If (Errorlevel<>0)
      break
    count += 1
    pos +=1
  }    
  return count
}

Minesalot
Expert Boarder
Постов: 236
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Последнее редактирование: 30.05.2017 01:26 Редактировал Minesalot.
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#46209
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 16
Minesalot wrote:
Working on a method to sense roid types in overview and confirm things. Instead of imagesearching for "Nothing Found".

ScanOverview function looks promising. It spits out this to the ini.

Код:


[ScanOverview]
     RoidDistance=11000|12000|12000|12000|12000|13000|13000|14000|14000|15000|17000|20000|24000
     RoidName=Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Rich|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure
     RoidType=NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage



How would I go about reading the ini for RoidName, and checking it against the current crystal set?
[Crystal]
Primary=Plagioclase
Secondary=Pyroxeres
Tertiary=Scordite

Looks like it grabs the first 5 characters of the name and then puts a |

-I would have to iniread that line
-search for the first 5 characters of Primary if it appears at all.
-if it does not, I would then need to search for the other 5% and 10% version of each name. That could get quite big on the code

I may be complicating things though.
-If I just changed crystal types to primary settings and ScanOverview find roids, no need to do anything.
-If ScanOverview is empty run crystal change ahk

And btw ScanOveriew will come in handy on a few other things too.

Nevermind, found a bit of code that will help a lot. going to make some changes to a few things.

Код:


Name := "Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Rich|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Plagi|Asteroid (Azure|Asteroid (Plagi|Asteroid (Azure||"

Type := "ContainerWhite|ContainerWhite|ContainerWhite|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage|NoImage"

NameCount := % HowOftenIs(Name,"Asteroid")
TypeCount := % HowOftenIs(Type,"ContainerWhite")
msgbox, % Primary " : " NameCount " | Container : " TypeCount
ExitApp

HowOftenIs(Haystack,Needle)
{
  count = 0
  pos = 0
  Loop,
  {
    StringGetPos, pos, Haystack, %Needle%,, %pos%    
    If (Errorlevel<>0)
      break
    count += 1
    pos +=1
  }    
  return count
}



So, I think you have a good idea, but you could probably do a little more efficiently. Bear in mind the StrSplit() function, splitting on | would make an array where each object is a string. I'd read in the asteroid names from OverviewScan, split it to an array, and read in your Ini like this (using Plagioclase/Azure Plagio/Rich Plagio as primary, Veldspar/ConcentrateD Veldspar/Dense Veldspar as secondary, and Scordite/Condensed Scordite/Massive Scordite as tertiary for the example):
[Crystals]
Primary=Rich|Azure|Plagi|Plagioclase
Secondary=Dense|Conce|Velds|Veldspar
Tertiary=Massi|Conde|Scord|Scordite

Hopefully the first 5 characters of each asteroid are sufficiently unique...

So, for the method itself, you'd read in primary, split it to an array, and basically do a For loop for each item in Primary, use your function to determine the count. If the count > 0, break out of the loop, take the last item in the Primary array ("Plagioclase") and take that as the name to use to find the Crystal to swap to. Basically, checking each asteroid to see if it contains each of the valid Plagioclase names. If it finds any of them, break out of the loop, and use the last item of the array as the name of the crystal you want to load. Regarding the HowOften function, I'd probably modify it so that it can read in an array and iterate through each one finding a string, rather than using a count. Although teh count would be useful, if you want to set a limit on how many rocks need to be present to swap crystals (i.e., if there're 10 Pyrox and 1 Plagio, just use Pyrox).
AbbadonDespoiler
Expert Boarder
Постов: 375
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#46219
Re: On-Grid Booster Project 9 г., 3 мес. назад Репутация: 10
Making some really good progress. A hurdled cropped up that I want to fix. Not usually going to be an issue but I want to get rid of the problem before it becomes one.


What would be a good method of detecting if the mining lasers are running, and stop them. pixelsearch for green? its not always green so if the pixelsearch happens between a pulse it would be a false positive.

Mainly because the unload to cargo function and crystal change will not function while lasers are running.
Minesalot
Expert Boarder
Постов: 236
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
ВверхСтраница: 12345678...32
Модераторы: Slav2
© Macro Laboratory 2026
Все права защищены!
Design by Ivan Kozyrin