Leaderboard
Popular Content
Showing content with the highest reputation on 04/11/2013 in all areas
-
Play a music in IE without the sound ?
Tripredacus and one other reacted to BrewManNH for a topic
Maybe it's me, but why are you trying to play music without sound, isn't sound the reason you play music?2 points -
One of the main issues AutoIt coder could have is lack of built-in data compression mechanism. Doing it "manually" is not an option because of the slowness of the interpretter. So, it's either using third party dlls (whatever) or some Windows API that exposes the funcionality. In this post I will compress data using well known GDI+. That's graphical library, so it's not straightforward approach. First I'm making BITMAP out of data and then convert that image into a PNG. PNG format includes form of compression, so at the end what's get is compressed data. Compression level is not very high compared to other methods, but considering everything - who cares . Of course that compressing string "ABC" will not make much sense and will result in, IDK 150 bytes of output because PNG includes metadata that take space, but for data in sizes of more than few KB you will see the difference. Besides you will see how your data looks if it's taken to be a picture. Script will create PNG out of itself called Test_Image.png and then read it and print to console: GDIP_Compress.au31 point
-
My old implementation of a finder control like the one in Au3Info.exe has been pretty popular, so I was having a look to see if it needed any updating... And I want to offer my sincerest apologies to anyone who has used it. The code is so bad I think someone must have hijacked it as surely I can't have been THAT bad. So anyway. Here's how to do it properly. Reasons why this one is better: * Found out how to draw the inverted frame like Au3Info does (thanks Jon ) * You can now have as many of them as you want. And they can all have different icons. * No temporary files for resources, they are loaded straight from the binary. * There is some code to make sure that you never have frames left behind or not showing. It solves 99% of issues. * No globals. * Functions are now properly named. * My last one returned a dummy which you couldn't use for anything other than events. This one returns a handle * Doesn't use GUIRegisterMsg, so you can use it with this no problem * ... The only slight downfall is that, like other UDF controls, GUIGetMsg ignores it. Instead it sends notifications by WM_COMMAND messages (We all know WM_NOTIFY is a bit more work huh?). Right now there are 4, though I can add more easily enough. My favourite example is this: #include<GUIFinder.au3> $hGUI = GUICreate("_GUICtrlFinder_GetLastWnd Example", 300, 40) $hFinder = _GUICtrlFinder_Create($hGUI, 130, 4) GUISetState() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While True $iMsg = GUIGetMsg() Switch $iMsg Case -3 ExitLoop EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Switch _WinAPI_HiWord($wParam) Case $FN_WNDCHANGED WinSetTitle($hWnd, "", "Handle: " & _GUICtrlFinder_GetLastWnd($lParam)) Case $FN_STARTUSE WinSetTrans($hWnd, "", 150) Case $FN_ENDUSE WinSetTrans($hWnd, "", 255) WinSetTitle($hWnd, "", "_GUICtrlFinder_Create Example") EndSwitch EndFunc ;==>WM_COMMAND As you can see, it behaves like a custom control should. Download Includes examples + UDF. For those interested in implementation: It's a custom control, so I register my own window class, which stores information like icons and the last selected window using the "extra" window space, and the GetWindowLongPtr function. Most stuff is handled in the window proc, so GUIRegisterMsg is free for you to use for your own purposes. Mat1 point
-
In layman's terms... NTFS file system allows for file to be associated with more than one file stream. Streams other than the main are called Alternate Data Streams. Normally the users on Windows systems aren't aware of them because windows explorer can't show them. They aren't meant to be seen and have purpose of carrying additional information about the file they are "attached" to. For example if you download something from internet and try to run it, by default you should have shell window popping-up informing you about the risks of running downloaded material. That information is attached to the file right after it's been downloaded and it's saved as :Zone.Identifier ADS. Also some malware creators use ADS to hide and perform different actions from there. For example it's nothing unusual to find malignant executable module in ADS of seemingly benign executable. NTFS implementation for Compound Files also uses ADS, even exclusively. Anyway, the script I'm posting here allows you to list and view all streams of the file that you load. Three methods are used to enumerate streams depending on your wishes. You can choose to use NtQuery, BackupRead or FindStream method and maybe compare speed and availability of each method depending on your system specifications. NtQuery method is used by KaFu in his SMF, so that's not new, but other two methods are new to AutoIt AFAIK, unless used privately of course. There is a GUI around the three functions to show what they do, that part isn't really that important. You will notice that I'm displaying up to 1024 bytes of the selected stream. The script: ADS_Viewer.au3 edit: New script.1 point
-
Flying Birds and crawling frog, and others
mesale0077 reacted to GreenCan for a topic
Entertainment The idea was to adapt the eagle.au3 example posted by mesale0077 making the bird fly across the monitor. This is the result: eagle fly GreenCan.au3 But, I was not really happy with the result, so I thought, maybe use the original animated gif and move it across the monitor using a transparent GUI. This is a script based on an example of trancexx' GIFAnimation udf. GIFAnimation.au3 is required for below example and can be found here: GIFAnimation.au3 I think the result is much better than the perforated GUI. The script is a kind of a screen saver, or at least a distractor for the eye. FlyingBird.au3 (bug fixed by Mesale0077) flying_bird.ico New examples: Crawling Frog: CrawlingFrog.au3 frog3.ico Cheetah and Tiger: see Post #13 for the more information Version 1.0.0.1 Small bugfix to avoid the current active GUI to flip to the background. Only For those who already tested version 1.0.0.0: same fix for the child script Don't start it but replace the old on in @TempDir & "GIFS" by this new version If you run the script, no big issue but you will have to process kill it... Cheetah and Tiger (Most recent example 1.0.1.0) CheetahRun.au3 _TigerWalk.au3 This example is not only moving animals around your screen but you can capture (stop) these animals by clicking with your left mouse button on it. You can drag and drop the animals around the screen before it pauses. Two scripts are still required. One for the Cheetah and one for the Tiger. Both scripts communicate with each other via memory pointers (Nomad's functions) Remember to download trancexx' GIFAnimation.au3 (see link above) Compiling: You can run the client script (or both scripts) compiled but change the setting $b_TigerWalk_au3 to False Also be aware that you can run the compiled script only in 32bit mode, it will work fine on a x64 system though. Both scripts should be in the same folder There are only 2 pointers that the apps share, one for holding each other and one to stop pausing randomly (animals will run continuously, change the $bNoPause setting in CheetahRun.au3, it should be to False but I left it to True for the sake of the demo. I modified some images, so if you ran the past demos, please first empty your temp folder with following script. #cs ---------------------------------------------------------------------------- Author: GreenCan Script Function: Cleanup temporary folder for CheetahRun #ce ---------------------------------------------------------------------------- Global $sTempFolder = @TempDir & "\GIFS" DirRemove($sTempFolder, 1) Let me know if you find any bug, I exhaustively tested both scripts but as it is rather complex to debug, you never know... GreenCan1 point -
Flying Birds and crawling frog, and others
mesale0077 reacted to UEZ for a topic
Here my contribution: Flying Eagle.au3 Br, UEZ1 point -
Flying Birds and crawling frog, and others
mesale0077 reacted to GreenCan for a topic
You corrected a bug in GUICreate, thanks, (upgdatded post #1) $hGui = GUICreate("GIF Animation", $aGIFDimension[0], $aGIFDimension[1], -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) i will need more time to look into eagle_gif.au3. That looks quite complex to try to understand after midnight Thanks GreenCan1 point -
Perforator v1.25 build 2015-06-30 beta - perforate your GUI easily
mesale0077 reacted to GreenCan for a topic
@mesale0077 You beat me on this, we had the same idea, but my script is slightly different anyway (I hope you don't mind? ) Look here Flying Birds I started a new topic because in the second script I use animated gifs instead of perforated gifs, and obviously, I don't want to mix things too much. BTW, I believe the result is better with animated gifs. Grtz GreenCan1 point -
It's called a recursion error, and there's a Wiki article about how to avoid it when it's not necessary (such as in this case). You shouldn't have a function call itself, or call another function that loops back to the first function unless there's a good reason for it.1 point
-
Play a music in IE without the sound ?
MrVietA2 reacted to Mechaflash for a topic
Put your fingers on the 'Down' volume control until the bar is empty. Put your headphones on. Bask in the glory of non-sound music!And now you're even better than Beethoven was! He at least had to have the music going to feel it. You sir are now superior.1 point -
I will tell you if you can explain where you create this account (can you post the URL?) and why you need to create so many accounts?1 point
-
You mean it might violate our rules?1 point
-
1 point
-
Can you please describe why you do this in a loop? You go from one link to the next without any user interaction. I don't get what this is for?1 point
-
If I take your last exampleWhile 1 _IENavigate($oIE, "my website") $oFrame2 = _IEFrameGetCollection($oIE, 0) _IENavigate($oIE, _IEPropertyGet($oFrame2, "locationurl")) _IELinkClickByIndex($oIE, 1) $i = $i + 1 WEndI would change it toWhile 1 _IENavigate($oIE, "my website") If @error Then Exit MsgBox(0, "Error", "First _IENavigate failed with error " & @error) $oFrame2 = _IEFrameGetCollection($oIE, 0) If @error Then Exit MsgBox(0, "Error", "_IEFrameGetCollection failed with error " & @error) $sProperty = _IEPropertyGet($oFrame2, "locationurl") If @error Then Exit MsgBox(0, "Error", "_IEPropertyGet failed with error " & @error) _IENavigate($oIE, $sProperty) If @error Then Exit MsgBox(0, "Error", "Second _IENavigate failed with error " & @error) _IELinkClickByIndex($oIE, 1) If @error Then Exit MsgBox(0, "Error", "_IELinkClickByIndex failed with error " & @error) $i = $i + 1 WEnd1 point
-
nhocquan, You need to do some error checking. Every function sets the return value, @error and @extended if an error occurs. Only do the next step in processing when the previous one didn't return an error.1 point
-
Luckily this isn't true for Microsoft (and others)1 point
-
Sorry, still no luck. I get "No response from server. Proxy was unable to reach the requested host." Can you post the text of the error message you get?1 point
-
Still not working. Post a small reproducer i.e. code.1 point
-
Welcome to AutoIt and the forum, I can't see the image. Only get "Posted image". Is it only me?1 point
-
Use @ScriptName instead, because @AutoItExe gives you the full path and file name of the script or the path/filename of the AutoIt3.exe file.1 point
-
Perforator v1.25 build 2015-06-30 beta - perforate your GUI easily
UEZ reacted to mesale0077 for a topic
GreenCan I would like to thank to you GreenCan thanks to you, it was subject Internet booster it's just an example, maybe you could be in the future and very very thank you UEZ and new example eagle_fly.au31 point -
Perforator v1.25 build 2015-06-30 beta - perforate your GUI easily
mesale0077 reacted to GreenCan for a topic
This one is a special one for you UEZ. I could not replicate the error...Everything works perfect. L&H animated.au31 point -
Downloaded, tested, (almost) approved. During the first test with the latest build, the script crashed with an array error but I could not replicate it afterwards. No matter what I did afterwards, I could not get the error again, so let's assume my laptop had a bug So this is your 'last' last update? My little contribution to the perforated animation world: Felix animated.au3 Thanks GreenCan1 point
-
Drag and drop dir / folder only onto input control in GUI
mesale0077 reacted to UEZ for a topic
Try this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> f_gui_drop() Func f_gui_drop() Local $msg GUICreate("Test drop DIR only", 300, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) GUICtrlCreateLabel("Drop a dir only ... " , 10, 10, 200, 20) Local $dir_dropped = GUICtrlCreateInput("", 10, 30, 280, 20) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_DROPPED GUICtrlSetData($dir_dropped, StringRegExpReplace(GUICtrlRead($dir_dropped), "(.*).*", "$1")) EndSwitch WEnd GUIDelete() EndFunc Br, UEZ1 point