Jump to content

InternetMonkeyBoy

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

InternetMonkeyBoy's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Apples and oranges, but you can mix them. The trick is you hide the control, make your change and then show the control. I had that same problem and then I switched to GUISetState instead of WinSetstate and no longer had to do that. 11 years late, sorry, but for the next person looking for 'How to change a GUI control without hiding it first.'
  2. Very cool - got it and will check it out. Really it's a big fat way of doing this and I'll still use embedded resources. Brushing up on the latest DLL stuff and the A3X files. The main thing is a 10 year project that I'm doing (a verbal creator) will have 100s of thousands of resources from code to images and sound. These will reside on my servers and the software will pull down only the new stuff and changes. I'll be using DLLs 4 sure and a smattering of whatever. This thing is going to output in many different languages (450) and programming languages - so a balance will be found at some point. It's all going to be public domain including the databases. The biggest and most time consuming problem has been figuring out how to pay developers to write free code, so maybe it will be just me until my crypto gets going and the exchange is up. Thanks for your time, - Internet Monkey Boy
  3. A little sleep is good, I looked at that again and now I can see... Local $wav = DllStructCreate('byte array[' & BinaryLen($Bird) & ']') DllStructSetData($wav, 'array', $Bird) _WinAPI_PlaySound(DllStructGetPtr($wav), BitOR($SND_MEMORY, $SND_NODEFAULT)) Thanks Melba Working Wave String Play.exeWorking Wave String Play.au3
  4. Bird1.wavWavy.au3 Just trying to put $Bird1.wav hex string into memory and play it without writing or reading a disk file. I've gotten so use to just adding the resource that I can't remember how to do this. Spent too much time going in circles and figured I better just ask Melba or UEZ? - Thanks
  5. It's ok I'll get it done. Already started working on a pre-processor and that may be the way to go. Anyone else has some ideas to point me in the right direction? (>> Melba? <<)
  6. Please understand I love AutoIt and want to use it for more. If you guys and gals need to make some money and change to a commercial product let me be the first to offer up $500 US. I want to access everything like trash collection for instance. Many of my processes are very fixed or static. They do not change much or manipulate much data. Trash collection doesn't need to be done very much. I really need all the CPU horsepower I can get. If you use onevent can I somehow turn off any msg checking, or is that done automatically? Func AutoIt_Tweaker( $cmd, $attribute) ; Anything I can reach EndFunc Do I want to tweak the stuff that can break a program unless it's used right? Yes. pps - I understand that we may appear to be tards to you sometimes and I mean this with the most respect :: Sometimes the tone of your response could use a little tweaking... (please don't ban me lol) Thanks for your time.
  7. I'm going to build a new function that I have been unable to find. PLEASE CORRECT ME. It will tweak the internal AutoIt functions giving me the ability to trash stuff I do not want to spin around. Get it? Please throw me whatever you got and I will put it togeather. Ship it now. My supersleep() will be in here somewhere. It's on another thread.
  8. Ok, so here's the final (so far) for supersleep(): Func supersleep($ms) $ms = $ms * -10000 Local $dll = DllOpen("ntdll.dll") Local $struct = DllStructCreate("int64 time;") DllStructSetData($struct, "time", $ms) DllCall($dll, "dword", "ZwDelayExecution", "int", 0, "ptr", DllStructGetPtr($struct)) EndFunc ;==>supersleep I removed the static from the $dll handle open. Turns out the DLL handles it all just fine. Also, you do not even have to release the resource. Your program will do it when it ends. There is no memory bleed at all. Use this wisely. Strong mojo here. GL.
  9. Do you mean "NtDelayExecution" instead of "ZwDelayExecution"? Seems to have to same effect. Also once a call has been made to ntddll.dll it appears you do not even need static or global >> a simpel local works just the same.
  10. Here's a supersleep. It's very simple and I've found many DLL calls that work as well. Use with care because your script is dead for the ms you tell it. On my machines which are slow a process at idle with no GUI can tap 1 to 2 percent CPU. This gives you ZERO CPU usage. The way I'm using it is when there is no GUI up I call it several times... supersleep(250) supersleep(250 supersleep(250) supersleep(250) which bring my process CPU to zero but still allows onevent stuff to work fine. I'm also finding it useful to pepper my code with it. Cooling down processes that do not have to be in such a hurry. More to come... Thx Melba. I'll put a link up later after my next update. I don't think it violates the forum rules but I think you might want to look at it first. Func supersleep($ms) $ms = $ms * -10000 Local Static $dll = DllOpen("ntdll.dll") Local $struct = DllStructCreate("int64 time;") DllStructSetData($struct, "time", $ms) DllCall($dll, "dword", "ZwDelayExecution", "int", 0, "ptr", DllStructGetPtr($struct)) EndFunc ;==>_supersleep
  11. Your are right - your code works like I want mine to work. That's not my code though. I've gone through MSDN and any others I could find and I think I've got it work work. Kind of. I will post it today or so. The big difference is the size and what it is doing. I'll make at least two examples for you to check out. Once I've got this thing done there's another piece that I'll make to cool down a process that is up with a gui but needs to be very quite. I get that this seems like I'm running after tiny things but it isn't. It's very important because almost everything that goes through the project I'm working on will be prototyped in a clipper like AutoIt language. They are very much a like. This code will carry through to C/++, ASM, and even to JAVA (Android) PS- Melba may I include a link to my Software in a post? Should someone want to see what its being used in. I will not do that unless you say ok. thx.
  12. Well, I've tried all these things and combos of them. This thing re-spawns the same exe with different tasks. Simple sleep doesn't put the process down enough. IMB your machine must be very very fast. Execute 500 of those Sleep(100) processes and add it up and you'll see what I',m getting. I've found many DLL calls but not do it just the way I need it done. Anyways, it may not seem like such a big deal but when your doing this kind of thing is turns into a big deal. I'll crack it sooner or later and then someone will post some odd DLL call that does it better.
  13. Almost done. Thank you Melba23 very much for pointing me in the right direction. Been hitting MSDN and others but a few more tweaks and I'll post it late tonight. _supersleep() will bring your CPU on a preocess to .01 to .02 but normally 00.0000 (nothing) Next I will tweak the AutoIt (whatever it hooks into) and cool it down. This thing is really for developers running many many processes that NEED it to be super perty - that need the proces to be running all the time but like a zombie . Please post any tricks for cooling a process by turning off non onevent stuff. and thx. I think I'll change the name to _sleeplikeazombie() (kidding)
  14. Love all the comments and I'll post my final code but I was really looking to go the other way. Sleep for 1/2 second but with almost no cpu use. This call will work, but if there are any other trick you can think of to cool a process.... or to turn off some of AutoIt background stuff. I'm going for the lowest CPU when GUI is down but still monitor stuff now and then. Thx.
  15. Hello. I need a trick to make a process idle down less than sleep. I use onevents for almost everything, but the problem is the project I'm working on has almost 50 processes. Even at around 1% idle it adds up and there will be more processes added. What I'm looking to do is get to a C like idle of .03 to .08 cpu. Any tricks you have will be great and I will post the final code I use. I love AutoIt, but is does need a cooler name, lol. Thx.
×
×
  • Create New...