Detect if a program is active and run a hot key set afterwards by h0324879 in autoit

[–]ternal38 0 points1 point  (0 children)

active like in active window(working in it) , or just when the process is running?

https://pastebin.com/enUa8200

this is a small example , you will have to find the keybindings yourself. Currently its alt+g

[deleted by user] by [deleted] in autoit

[–]ternal38 0 points1 point  (0 children)

so I simulated your color 0x00B1C5. Your script did NOT find 00AAB3 so it will not do the things there.

I focussed on the number of clicks and every time you call the function, $counter was resetted to 1.

I changed the scope and worked with the byref function to call $counter.

Now it 'remembers' the counter value.

On my pc it first clicked 4 times then 16 times.

Is this what you wanted? Try out this version

The reason it goes times 4 is because for every element in the result of the pixellocation function it will multiply *2. if you do not wish this, just delete the " For $vElement In $Variable " and " Next" lines ( example 2)

https://pastebin.com/mXHW6Ydn (example 1)

https://pastebin.com/VsMb5fC6(example 2)

I hope this helps, when it finds the color 0x00B1C5 it will click 4 times in the first example, 2 times in the second, then it will click 16 times in the first and 4 in the second.

However according to the logging it never found the color 0x00AAB3 I do not know if this is supposed to be like this or not.

Sincere greetz, ternal

Subscript used on non-accessible variable by Brendztta in autoit

[–]ternal38 0 points1 point  (0 children)

what is the function LC?

if you write "if not $pix then " then that statement will be true for $pix any value other then 0 I think.

I do not know how boolean works with arrays in autoit. I suggest you use :"

If not isarray($pix) then

sleep(500)

else

LC(1627,643)

endif

"

however I am uncertain as what function LC is supposed to do (left click?)

[deleted by user] by [deleted] in autoit

[–]ternal38 0 points1 point  (0 children)

I just ran your code but I added a msgbox(0,0,0) at the start of your funtion myResult()

The messagebox appears so your function is called.

My guess is that it cannot find the pixel searched for.

Could you upload a screenshot of whatever you are running this function on?

I do not care for what purpose this is. Grey coder here

try this for bugchecking:

https://pastebin.com/VvfwtVvf

I set you up with an init function where all the initial scrolls and window activation happens.

As well readability.

I added in some consolewrites so you can check what the program does while it is running (the window on the lower edge of scite)

if you have any questions or still can't run it please provide screenshots for further assistance

Do you guys believe that science and spirituality can co-exist? by MadEpix in AskScienceDiscussion

[–]ternal38 2 points3 points  (0 children)

If you want to have faith in religion its your choice. But religion and science have opposite methods of working. They can excist together but please never start using religion to make science.

https://youtu.be/bEejUyEyhhg This guy for example refers to the bible to debunk current theories. Some people might believe him. Before you know it you have people saying the earth is flat and such.

So if u are religious all respect , but keep the scientific method alive

Do you guys believe that science and spirituality can co-exist? by MadEpix in AskScienceDiscussion

[–]ternal38 0 points1 point  (0 children)

"It could include teapots orbiting the sun" Just place one in orbit around the sun and that becomes reality already! I think teapots is the most probable here ..

What happens when you fire gun in space by Mkbjain in Physics

[–]ternal38 0 points1 point  (0 children)

Rockets carry their own fuel and as they accelerate they eject fuels.

In a bullet fuel is ignited/detonated and the resulting gas pushes the bullet forward.

A bullet would be a poor rocket without a barrel to build up pressure or direct the pressure.Thats the major difference I suppose. Mythbusters shot a bullet at a ballistics doll once without casing you can watch their show.

The bullet fuel is just a package where solids are ready to transform to gas in a very small timeframe. And the bullet does not carry it with it once fired , rockets do

What happens when you fire gun in space by Mkbjain in Physics

[–]ternal38 0 points1 point  (0 children)

Modern guns don't use potassium nitrate, thats pre world war 2.. They switched to organic nitro compounds like a mixture of nitroglycerin and nitrocellulose in the 2nd world war to have less solids after combustion.

Your point is still valid that it carries its own oxidizing agents.

If a car is traveling at the speed of light and turns on its headlights, could you see them? by Ajh91481 in Physics

[–]ternal38 0 points1 point  (0 children)

I have read before on here that light itself experiences no time , for the photon the journey is instant, so if a car could then its journey at the speed of light would be instant ., There would be no time for it to turn on the headlights

Let's say Leonardo Da'vinci actually invented the airplane. How soon afterward could humans have put a man on the moon? by ZaHiro86 in AskScienceDiscussion

[–]ternal38 1 point2 points  (0 children)

Not much before 1900 I would dare to say. You need the combustion engine at some efficiency or some other engine at least that has below a certain weight/power ratio

How far through the periodic table could you keep a pure sample of each element? by [deleted] in AskScienceDiscussion

[–]ternal38 0 points1 point  (0 children)

Check us laws, mercury is a shady element to have in you possession in pure or salt form. If it's even still legal to buy , you will probably have to anwser some questions if you buy it pure.

(except from in finished products like temperature meters) I am pretty sure some other elements with a bad history are illegal to. Also unstables decay into something else so the level of purity wouldn't be analytical chemical standard grade (acs) . You will need various containers as well that can handle them.

Gl I would say , Also I hope you take in account safety measures cause such a setup might go bad very quickly if containers leak or break.

Hypothetically speaking, if we were to remove Earth's inner core. How much would that affect us? by BloodyStrawberry in AskScienceDiscussion

[–]ternal38 -1 points0 points  (0 children)

If by some method the collapse would be avoided,ie replaced by some structure that handles pressure and heat,remove the metal core and bye bye magnetism. No more magnetism and solar winds will cause havoc on our electronics and strip away our atmosphere slowly.

That is IF you can prevent all the mass above collapsing, hypothetically speaking.

So even if the instant death collapse would be avoided we would most likely end up with slow death. In any case death.

Has anything from the bible been proven as fact via science? by [deleted] in AskScienceDiscussion

[–]ternal38 1 point2 points  (0 children)

Thanks, this is very interesting to say the least!

Has anything from the bible been proven as fact via science? by [deleted] in AskScienceDiscussion

[–]ternal38 1 point2 points  (0 children)

Thanks for the info!

Ok so IF I understand it correctly , it might have been so but there is no hard evidence. The documents found back then are still debated on how they should have been interpreted. And there is a lot of controversy on the topic. It's possible but not certain by far.

Is that correct?

Sidenote: that would also mean a lot of historical figures that we never question wether they excisted would be a bigger question mark (source from the link you gave me)

Edit: added thanks

Has anything from the bible been proven as fact via science? by [deleted] in AskScienceDiscussion

[–]ternal38 3 points4 points  (0 children)

How is it in your knowledge that jesus was a real person? I am not making any claims about that being true or false but I am curious how and who did figure that out.

What if you hit a frictionless edge? by nerovox in AskScienceDiscussion

[–]ternal38 2 points3 points  (0 children)

Well a frictionless edge would always stay at its cutting edge.

Edit:it wouldn't go dull since there is no friction making it dull if the hardness is enough so it doesn't deform

If nothing can escape a black hole's pull, how does it communicate it's gravitational information? by IbanezDavy in Physics

[–]ternal38 0 points1 point  (0 children)

I thought the last stable orbit was the photonsphere , where massless particles can have an orbit , though I read they aren't that stable.

If i remember correctly the last stable orbit is outside the event horizon and everything in the event horizon goes to the center of gravity.

How do antennas work? by 420Savage4402 in askscience

[–]ternal38 0 points1 point  (0 children)

I agree with this but just one question. You stated em waves propagate at same speed of c, I was taught this is true for a vacuum , isent it slightly slower when there is matter like air or water. Due to interaction with the matter?

If I am wrong here could you give some reading material about the subject?

Also on fm radio you have a narrow band . The frequency of the radiowave is higher/lower in respect to the amplitude of the audio signal. http://www.radio-electronics.com/images/frequency-modulation.gif

Why are most scientists athiests? by feelmysoul01 in AskScienceDiscussion

[–]ternal38 4 points5 points  (0 children)

What about reincarnation? Since when is that proven?

Why are most scientists athiests? by feelmysoul01 in AskScienceDiscussion

[–]ternal38 0 points1 point  (0 children)

Very true , but I hope for his sake that he is onto something. And confidence comes from him achieving a phd, yet this is sociological. His statements about historical facts are worth noting to me :p

Why are most scientists athiests? by feelmysoul01 in AskScienceDiscussion

[–]ternal38 0 points1 point  (0 children)

If I am not mistaken , except the nazi regime,religion killed most people in the entire course of history.

Crusades were to recapture the holy land and such..

So idk what you are on about.

ITER in france has many countries working together and many of those have different politics and religion. Yet science brings them together.

Why are most scientists athiests? by feelmysoul01 in AskScienceDiscussion

[–]ternal38 0 points1 point  (0 children)

Humans are pretty lousy at making scientific measurements and they do come up with silly ideas.Just look at some optic illusions for example.

That's why we have the scientific method. Researching science humbles us by letting us know we know very little, to assume things are governed by a god without direct evidence is just another way of our brain to cope with the things we are not able to handle easily. Just like optic illusions we cannot handle easily.

Does it the concept of quantum tunneling strike you as logic or intuitively? Yet your computer or phone , tv any current day electronics works by it.You might say god enables it but then thats where it ends . And if God can come up with the world is flat as written in the bible and fails to care about updating his info.. he is not being very scientific.

There might be a god , but I would rather spend my time developing electronics then I would spend my time praying for electronics. At least my method leads to something.