Recently Browsing 0 members
No registered users viewing this page.
it has been a long time since i have been here and a long time since i last used autoit. ever so often when the time allows me to, then i follow up on an idea that i had a long time ago. i have done all the work on paper but now it is up to writing it in autoit and i keep stumbling over many little issues here and there. sometimes after a few days i will try again and get a step further but sometimes it just will not help no matter how long i try and think about a solution. for most of you it will be the basics but for me it is not all that easy, but at least i give it a try.
right, down to business:
here is my code:
#include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <Array.au3> #include <String.au3> ; ; PART 1: define replacements and check with msgbox ; Global $y, $z $y = "Yes" $z = "No" MsgBox(0,"replacements", $y & @CRLF & $z) ;the replacements in a message box ; ; PART 2: set the texts and check via console and msgbox ; Global $my1string = "abab" ;the first specified text MsgBox(0,"my1string", $my1string) ;the message box to output the first specified text Global $my2string = "icic" ;the second specified text MsgBox(0,"my2string", $my2string) ;the message box to output the second specified text ; ; PART 3: transform the strings to individual arrays ; $my1array = StringSplit($my1string, "") $my1array = "" _ArrayDelete($my1array, 0) _ArrayDisplay($my1array, "my1array") ;the display of the first specified array $my2array = StringSplit($my2string, "") $my2array = "" _ArrayDelete($my2array, 0) _ArrayDisplay($my2array, "my2array") ;the display of the first specified array ; ; PART 4: create an empty array for filling ; Global $OutputArray $OutputArray = "" _ArrayDisplay($OutputArray, "OutputArray") ;the display of the first specified array ; ; PART 5: compare & fill empty OutputArray with data after evaluation ; Global $i, $j, $k For $i = 0 to UBound($my1array) -1 For $j = 0 to UBound($my2array) -1 For $k = 0 to UBound($OutputArray) -1 If $my1array[$i] = "a" And $my2array[$j] = "i" Then $OutputArray[$k] = $y Else $OutputArray[$k] = $z EndIf Next Next Next _ArrayDisplay($OutputArray, "OutputArray") ;the display of the Newly filled Array In "Part 2" i make a string that is converted to an array in "Part 3" ... Now, I know that "a" and "i" are always in the exact same spot in both arrays and so i wanted to compare this and make a further array to document my findings by saying "yes" or "no" ... however my new array keeps saying just "no" allthough i can clearly see and know that it should say:
yes no yes no my guess is that there is something wrong within my for-loops and that the counting is somehow "off" i guess that when the first for-loop is finished it reaches the second whilst the second for-loop is checking the first which would explain why it always says "no" instead of seeing the obvious.
so my question would be: what is wrong with my for-loop? or where am i making an error that ultimately gives me the wrong results?
help is much appreciated.
PS: sorry for my not so great english spelling ... stupid german sitting here trying out intermediate english skills.
This file includes all the source codes and a compiled .exe version of zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player. I made this to suit my purpose and you can tweak it to your taste. The source code is only about 1300 lines and only standard #include files were used.
zPlayer was my first AutoIt project through which I was hoping to learn coding. A media player capable of playing back audio and video files was my initial goal, but video was beyond my capacity for my lack of coding experience. So zPlayer was born as an audio-only player and remained so up to Version 126.96.36.199.
Just recently I decided to add video function to zPlayer now that I had gained some experience. I thought it would be possible, but I didn't expect it to be this simple. I made minimal changes to the existing code and added only about 80 lines and, voila, I have an integrated audio and video player, starting from Version 188.8.131.52.
This player has the following features:
- Play back all formats of media files which can be played back by the Windows Media Player in your computer
- Depending on the file types specified by the user in zPlayer.ini file this player can be either audio only, video only or both.
- Video window is independent of other windows and, when it is maximized, increases the immersion of the user
- Graphical player similar to embedded Windows Media Player
- Forward, backward, pause, repeat, shuffle function
- Increase/decrease/mute sound volume
- Change folders and create playlist for all media files in that folder and its subfolders, and support for manually-made playlists
- Save play-back environment when terminating and resume that environment when restarting
- With one click, you can see internet search results for the file selected in playlist
- With a double-click, you can play back an item in the playlist
- Search strings in the playlist
- Option to see long file names including folder names
- Resize the playlist and video windows, and restore them to their default positions
- Very small footprint: very low CPU and memory usage, with only about 1MB when compiled
- You can even hide all the windows and manipulate the player with hotkeys only
Note: zPlayer is the name I used when I introduced the early version of this player in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
zPlayer is the name I used when I introduced the early version of this player in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
After I retired from active duty in 2002 I spent much time listening to music. First I started with CD's and LP's, then quickly moved on to mp3 files. I converted many of my CD's to mp3 and I collected many more from various sources which were freely available at the time. As the number of my mp3 files grew, I put them in folders according to their genres and my favorite classifications. I mainly used Windows Media Player to listen to them and I slowly began to dislike wmp because it had massive user interface while I just wanted to listen to music in the background while I was doing other work in the foreground, hopping between folders from time to time. It was the time I was beginning to learn AutoIt and I thought I should make my own player with AutoIt. Coming from a sales career with no experience in programming, it was not an easy task. Somehow, after about 2 years of learning and trying, I had my own audio player which worked with only hotkeys without any graphical interface. I gave it to some of my friends who were not as computer-savvy as I. They liked it but definitely wanted something to clcik with mouse. So I came up with very rude gui which took a form similar to what it is now.
The attached source files include one au3 file, one icon file and 14 jpg files. The jpg files are used for drawing a graphical player and are fileinstalled in @DocumentsCommonDir folder. This player uses WMPlayer.OCX as its engine and supports all audio file formats supported by wmp and additional codecs installed. I would like to thank @Bilgus for kind answers to my questions and would appreciate it if anyone could review the code and give me any suggestion. This player works for me, but I don't know whether the code is presentable as an example. I am posting this here with a hope to learn much from AutoIt community.
PS: 1. An error (Variable used before declaration) was reported and corrected - 02:00 hours GMT, March 14, 2019
2. An error in tray menu was corrected -10:00 hours GMT, March14, 2019
3. AutoIt3Wrapper_Au3Check_Parameters definition was added at the top of the code and all ensuing errors were corrected. - 00:10 hours GMT, March 16 2019
4. Some features were added. - 10:30 hours GMT, March 18, 2019
a. Jumping to new play-back position in a file
b. Support for a manually made playlist
c. Ctrl+Alt+h hotkey to trigger a help message box
5. The minimum resizing width of playlist window was set at 450. - 01:10 hours GMT, March 23, 2019
6. Problems associated with actions taken while in 'paused' status was addressed. - 07:40 GMT, April 12, 2019
7. An error was found and corrected in restoring previous play-back environment when the mode was 'Shuffled.' - 11:00 GMT, April 17, 2019
Please see Downloads section of this forum for source code files.
This is a project that I have been working on for several months off and on.
It's a simple "What You Hear" MP3 @ 320Kbps and WAV audio recorder.
- LoudMax, a Gain Controller and Look-Ahead Limiter
- Auto Shut-Off after one minute of silence
- Side-by-Side Simulated LED Meter
- Running Time Counter
It started off being a large project, but I eventually stripped it down to its
bare essentials because I came to realize that it would be very difficult to
deal with every sound card and every way a PC is set up for audio. It would
have been a nightmare that I was not willing to go through.
This project contains the most up-to-date BASS.dll v.184.108.40.206 - December 17, 2019.
All BASS Dll's are 32bit. Those and the needed UDF's are included in the zip file.
I will try to explain how it works in the next post.
BASS VST Recorder v1.1.zip