
NBJ
Active Members-
Posts
50 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by NBJ
-
Hello all, especially @monoceres, I am really sorry for the thread Necro, I have been using this UDF for a few years to help a few digital artists show their artwork, and it work really well for the most part. I have hit a little snag recently, which I am hoping your brilliant hive minds will be able to assist with. The setup I am having an issue with is a 2 monitor setup, with the second monitor in Portrait mode. (windows 10 x64 - 32bit compile and 64bit compile) When Playing a video on the portrait screen, the video is cut off about half way down (at the same location as the @DesktopHeight) I have tested a few different scenarios, but the easiest is using the great AAA player (link in top post). If you open the player on the Portrait screen and stretch it to fill the screen, it shows the video not being rendered in the lower half, I have attached an image when stretched, and a picture of the same video when the window is not stretched. I can almost avoid the problem, by setting the windows 10 scale and layout to 100%, re-logging in and then setting the scale to 200% which will then allow the video to play correctly, so I am thinking there may be an issue with some thing in the dll which is overriding the display settings if it thinks they are no longer on the desktop window. I am aware that this UDF is old, and is probably no longer the best way to do video playback, however it does some nice things, which I am yet to figure out using other methods. _ I am very open to advice on the best way to play videos using new systems in Windows 10. Currently I play multiple videos, on multiple windows, cross fading between them I also use the Engine_SetRects to choose which part of the artwork to show on which screen. So my questions are: Is there any chance that @monoceres could check the DLLs and see if there is a reason why the movies would be cut off (long shot I know) What is the best way in this modern world to play video in AutoIt? Working with Artists, there is always the need to do something different and groundbreaking. many many thanks in advance NBJ
-
Thanks AutoBert, For anyone else searching for a solution, I found that I am having some success using the kernel32.dll method from the thread https://www.autoitscript.com/forum/topic/80344-serial-communication-using-kernel32dll
- 7 replies
-
- windows 10
- arduino
-
(and 3 more)
Tagged with:
-
Sorry to necro an old thread, Was anyone able to figure out this issue? On one of my machines the Arduino is linked to Com3, Com3 shows in the list of available ports using _CommlistPorts() but it throws an error -16 - ERROR=-16 $sportSetError=port does not exist Any assistance would be appreciated.. Cheers NBJ
- 7 replies
-
- windows 10
- arduino
-
(and 3 more)
Tagged with:
-
Hi VAG, Sorry, my sub to this topic must have expired. Yes - the FTDI chip is used in many USB serial devices. I am happy you have found the UDF useful, and thank you for posting your modifications back to the forums. I have not had time to get back to this project recently, I am sure I will get back to it very soon, just need "Spare" time Please feel free to PM me on this topic. If I can help I will. Cheers NBJ
-
sorry my brain is not allowing me to concentrate on this right now. give me a couple of days and I'll get it sorted. I was suggesting a method for making your program rather than trying a fix for the UDF above. The UDF above was my first delve into dll calls and stucts etc, so I am sure it is full of errors and the synax and methodology can be improved. I will have a UDF called DMX_[Enttec_USB_FTD2xx]_UDF.au3 ready for showing soon - basically I need to document - (which I wish I had done when I was writing it, moths ago, hope the memory is still there). The New UDF is more specifically designed for the Enttec devices rather than the generic UDF for the FTD2xx.dll I will need to spend some time and have a look at the UDF above and see whats happening. The dll should be from enttec.com in the driver pack for the DMX USB PRO or the openDMX devices. I have pulled out a the section below for you to have a look at. Sorry I haven't been more helpful yet. Neil #Region - Examples ConsoleWrite(@CR & '!------------_DMX_NumberOfDevices()-----------------------') $iNumDevices = _DMX_NumberOfDevices() ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$iNumDevices=' & $iNumDevices) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_DeviceSerialNumberFT()-----------------------') $iDeviceSerialNumberFT = _DMX_DeviceSerialNumberFT($iNumDevices - 1) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$iDeviceSerialNumberFT=' & $iDeviceSerialNumberFT) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_DeviceDescription()-----------------------') $iDeviceDescription = _DMX_DeviceDescription($iNumDevices - 1) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$iDeviceDescription=' & $iDeviceDescription) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------$iDeviceLocation()-----------------------') $iDeviceLocation = _DMX_DeviceLocation($iNumDevices - 1) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$iDeviceLocation=' & $iDeviceLocation) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_OpenDevice()----------------------------') $hDeviceHandle = _DMX_OpenDevice($iNumDevices - 1) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$hDeviceHandle=' & $hDeviceHandle) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_BytesInBuffer()----------------------------') $QueueStatus = _DMX_BytesInBuffer($hDeviceHandle) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$QueueStatus=' & $QueueStatus) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_DeviceSerialNumber()----------------------------') $DMX_DeviceSerialNumber = _DMX_DeviceSerialNumber($hDeviceHandle) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$DMX_DeviceSerialNumber=' & $DMX_DeviceSerialNumber) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_DeviceDetails()----------------------------') $DMX_DeviceDetails = _DMX_DeviceDetails($hDeviceHandle) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$DMX_DeviceDetails=' & $DMX_DeviceDetails) ConsoleWrite(@CR & '----------------------------------------------------------') $sSendDMX = _DMX_SendDMXVariableDataLength($hDeviceHandle, $DMXValues, $iArrayStart) $sSendDMX = _DMX_SendDMX($hDeviceHandle, $DMXValues, 513) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$sSendDMX =' & $sSendDMX) ConsoleWrite(@CR & '----------------------------------------------------------') $sSendDMX = _DMX_SendDMX($hDeviceHandle, $DMXValues) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$sSendDMX =' & $sSendDMX) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_ResetDevice()----------------------------') $DMX_ResetDevice = _DMX_ResetDevice($hDeviceHandle) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$DMX_DeviceDetails=' & $DMX_ResetDevice) ConsoleWrite(@CR & '----------------------------------------------------------') ConsoleWrite(@CR & '!------------_DMX_CloseDevice()----------------------------') $hDeviceHandle = _DMX_CloseDevice($hDeviceHandle) ConsoleWrite(@CR & 'Error=' & _USBFT_ErrorDescription(@error)) ConsoleWrite(@CR & '$hDeviceHandle=' & $hDeviceHandle) ConsoleWrite(@CR & '----------------------------------------------------------') Ok - so it will be more than a few days - I am sorry, I have a major project due mid Feb - So it will have to wait until after that, Really sorry
-
Hi, Oh - Um - Brain Failing - was such a long time ago when I wrote the UDF for the FTD2xx.dll UDF I am using a new UDF specifically for the Enttec DMX USB devices these days - Its been modified since the one above. Basically if I remember correctly in the new UDF you start the device then use SendDMX($ahDMXValues[512]) - or DMXSend() cant remember - I'll have a look as soon as I get some time. to send out the DMX values. it does create a dllstruct for the array to pass to the device, so there is probably a little excess fat in the program than requred.
-
Well it really does only access the first 24 channels and as it is a 1:1 patch (as I haven't added patching yet _) it really only does 24 channels What you are really after then is submasters. - however operating submasters live on a PC is quite a challenge (physically for the operator). Which is sort of what the buttons do, except that at the moment the buttons don't have an "ADD" function - only a xFade function. the plan is to use the 'Group' buttons to group like faders, so you can control a group with one fader - but that will come later, this Desk was designed for a small venue (infact they only have 12 dimmers and a couple of LED colour changing parcans. Thanks for the feed back - greatly appreciated. btw - Groups not implemented yet so understandable that you cant get them to work Also on your previous question - yes you can address 2 devices simultaneously. I am sure you can with the non pro also - but I haven't tested that. Cheers
-
Hi James, Yes they are 2 universes, and with the DMX USB PRO at least, you can address 2 individual devices. Haven't tried with the Open as it has some timing issues, so I spent the extra $$ on a couple of PRO devices. The software should work with the open device as well, I can get hold of one, so when I do I will let you know. - added a 24 channel lighting desk in post one. Cheers NBJ
-
A couple of ways: put them into an array and use _arraysort Use Max() Any other ideas?
-
Try the FileRead function.
-
Hi Nigel. In its simplest form you would use the functions While 1 $textToWrite = InputBox ( "title", "Prompt" [, "Default" [, "password char" [, width, height [, left, top [, timeOut [, hwnd]]]]]] ) FileWriteLine ( filehandle or "filename", $textToWrite ) Wend Something like Global $file=@DesktopDir&"\File.txt" Global $TextToWrite While 1 $TextToWrite = InputBox ( "Write Stuff", "What do you want me to write?" ) FileWriteLine ($file,$TextToWrite) WEnd Cheers NBJ edit: bugger too slow!
-
Just a quick update - there is now a 24 channel lighting desk in beta, lots of error control not in there yet, but sending DMX reliably and smoothly. if there is anyone interested I will post the exe. not quite ready to post the source yet. Thanks NBJ
-
@Monocess-Thanks I'll check them out, I cant believe I missed them! cheers@AdmiralAlex - Yes - I'll have a look though those also. Still need to get my head around the different wav formats and figure out how to convert mp3 etc to wav, then store image so it doesn't have to redraw etcetc..... Thanks to both of you
-
I suppose it could - there is an ArrayDiff() function on the forum what could be used to compare 2 different wav forms
-
Hi, Over the past few years there have been some requests for a waveform visualization, I haven't found one so I thought I'd whip up a quick one with my limited skills. I am sure some of you guys and gals can refine it and make it better - especially with GDI+ etc. Just a quick and dirty example for people looking for somewhere to start. Also a quick mod to the Seek function to allow seeking to ms. #Include <File.au3> #Include <Array.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <Sound.au3> #Include <GuiSlider.au3> $file = 'C:\windows\Media\chimes.wav' $file = 'C:\windows\Media\recycle.wav' $file = @DesktopDir&'\WAVs\demo.wav' $file = 'C:\windows\Media\notify.wav' $file = 'C:\windows\Media\tada.wav' $file = 'C:\windows\Media\Windows XP Logon Sound.wav' $file = 'C:\windows\Media\Windows XP Start.wav' $file = 'C:\windows\Media\Windows XP Shutdown.wav' $x=1 $gui = GUICreate("WAV VIS", @DesktopWidth-40,@DesktopHeight-100) GUISetState(@SW_SHOW) $timer = TimerInit() Global $Array $fileopen = FileOpen ( $file, 16 ) $memory = FileRead($fileopen) FileClose($fileopen) $fileopen="" $string = String($memory) $memory ="" ;ConsoleWrite($string) Global $array[StringLen($string)] $array = StringSplit($string,'',2) $string = "" $viewerWidth = (@DesktopWidth-40)-20 $viewerLeft = GUICtrlCreateGraphic(10,10,$viewerWidth, 256,$SS_SUNKEN ) $progress = GUICtrlCreateSlider(10,266,$viewerWidth,40,BitOr($GUI_SS_DEFAULT_SLIDER, $TBS_TOOLTIPS)) ;$viewerRight = GUICtrlCreateGraphic(10,310,$viewerWidth, 256, $SS_SUNKEN ) $play = GUICtrlCreateButton("PLAY",10,320) $pause = GUICtrlCreateButton("PAUSE",50,320) $Time = GUICtrlCreateLabel("Time",200,320,300,50) $zoom = $viewerWidth/(UBound($array)) $step = int(UBound($array)-88/$viewerWidth) ConsoleWrite(@CR & TimerDiff($timer) & ' Zoom = ' & $zoom & ' Step = '&$step) $sound = _SoundOpen ( $file ) $soundLegnth = _SoundLength ( $sound , 2 ) GUICtrlSetLimit ( $progress,$soundLegnth , 0 ) _GUICtrlSlider_SetTicFreq($progress, 1000) For $loop = 88 to UBound($array)-4 step 4; 44 is the offset where the data exists ;ConsoleWrite(@cr & $loop & '~') $left = ($array[$loop] &$array[$loop +1]) $left = Dec($left) if $left >127 then $left -= 255 if GUICtrlRead($time) <> int($loop/UBound($array)*100) then GUICtrlSetData($time,int($loop/UBound($array)*100)) ;$right = ($array[$loop+2] &$array[$loop +3]) ;$right = Dec($right) ;if $right >127 then $right -= 255 ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_MOVE,0,0) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_pixel,int(($loop-88)/4)/100, 127+$left) ;if $x<> (int(($loop-88)*$zoom)) then ; ConsoleWrite(@cr & '$x='&$x & ' ($loop-88)*$zoom='&($loop-88)*$zoom) ; ; EndIf GUICtrlSetGraphic($viewerLeft,$GUI_GR_line,(($loop-88)*$zoom), 127+$left) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_line,(($loop-88)*$zoom), 127+$left) ;if ($x/60000) = int($x/60000) then ConsoleWrite(@cr & ($x/60000)&'=' & int($x/60000));GUICtrlSetGraphic($viewerLeft,$GUI_GR_RECT,(($loop-88)*$zoom), 0,1,256) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_REFRESH) ;GUICtrlSetGraphic($viewerRight,$GUI_GR_line,int(($loop-88)*$zoom), 127+$left) ;GUICtrlSetGraphic($viewerRight,$GUI_GR_pixel,int(($loop-88)*$zoom), 127+ $right) ; GUICtrlSetGraphic($viewerRight,$GUI_GR_pixel,(($loop-88)*$zoom), 127+$left) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_pixel,int(($loop-88)*$zoom),0) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_pixel,int(($loop-88)*$zoom),127) ;GUICtrlSetGraphic($viewerLeft,$GUI_GR_pixel,int(($loop-88)*$zoom),255) ;ConsoleWrite(int(($loop-88)/4)/10& '(' & $left); left channel ;ConsoleWrite('-') ;ConsoleWrite($array[$loop+2] &$array[$loop +3] ); right channel ;GUICtrlSetState($viewerLeft,$gui_Show) $x=int (($loop-88)*$zoom) $array[$loop] ='' $array[$loop+1]='' Next $array='' GUICtrlSetState($viewerLeft,$gui_Hide) GUICtrlSetState($viewerLeft,$gui_Show) ;GUICtrlSetState($viewerRight,$gui_Hide) ;GUICtrlSetState($viewerRight,$gui_Show) ConsoleWrite(@CR & TimerDiff($timer) & ' ------------- Drawn' ) $sound = _SoundOpen ( $file ) $soundLegnth = _SoundLength ( $sound , 2 ) GUICtrlSetLimit ( $progress,$soundLegnth , 0 ) _GUICtrlSlider_SetTicFreq($progress, 1000) _SoundPlay ( $sound) While 1 if _SoundStatus($sound)= "playing" then GUICtrlSetData($progress,_SoundPos ( $sound , 2 )) ;if int(GUICtrlRead($time)/100) <> int(GUICtrlRead($progress)/100) then GUICtrlSetData($time,GUICtrlRead($progress)) $msg = GUIGetMsg(1) If $msg[0] > 0 Then ConsoleWrite(@CR & "$msg[0] = " & $msg[0]) Switch $msg[0] Case $GUI_EVENT_CLOSE ExitLoop Case $progress Slider() Case $play _SoundPlay ( $sound) Case $pause _SoundPause ( $sound) EndSwitch WEnd Func ms2hms($ms) ; converts ms to an array, $array[0]=hrs $array[1]=min $array[2]=sec $array[3]=ms Local $array[4] $ms_per_HR = (1000 * 60 *60) $ms_per_min = (1000 * 60) $ms_per_sec = (1000) $array[0]= int ( $ms/ ($ms_per_HR)) $array[1]= int (($ms - ($array[0]*$ms_per_HR))/$ms_per_min) $array[2]= int (($ms - ($array[0]*$ms_per_HR) - ($array[1]*$ms_per_min))/$ms_per_sec) $array[3]= int (($ms - ($array[0]*$ms_per_HR) - ($array[1]*$ms_per_min) - $array[2]*$ms_per_sec)) ConsoleWrite(@cr & $ms & 'ms = ' & $array[0] &' hrs '& $array[1] &' mins '& $array[2] &' sec '& $array[3] &' ms ' ) Return $array EndFunc Func Slider() $SeekTime = ms2hms(GUICtrlRead($progress)) if GUICtrlRead($timer) <> GUICtrlRead($progress) then GUICtrlSetData($timer,GUICtrlRead($progress)) _SoundPause($sound) SoundSeekNJ( $sound, $SeekTime[0], $SeekTime[1], $SeekTime[2],$SeekTime[3] ) _SoundPlay($sound) EndFunc Func SoundSeekNJ(ByRef $aSndID, $iHour, $iMin, $iSec, $MS_1) ;Declare variables Local $iMs = 0, $iRet, $vTemp If Not IsArray($aSndID) Then If Not FileExists($aSndID) Then Return SetError(3, 0, 0) ; invalid file/alias $vTemp = FileGetShortName($aSndID) Dim $aSndID[1] = [$vTemp] EndIf If StringInStr($aSndID[0], '!') Then Return SetError(3, 0, 0) ; invalid file/alias ;prepare mci to receive time in milliseconds __mciSendString("set " & $aSndID[0] & " time format miliseconds") ;modify the $iHour, $iMin and $iSec parameters to be in milliseconds ;and add to $iMs $iMs += $MS_1 $iMs += $iSec * 1000 $iMs += $iMin * 60 * 1000 $iMs += $iHour * 60 * 60 * 1000 If $aSndID[1] <> 0 Then $aSndID[2] = Round($iMs * $aSndID[1]) - $iMs $iMs = Round($iMs * $aSndID[1]) EndIf ; seek sound to time ($iMs) $iRet = __mciSendString("seek " & $aSndID[0] & " to " & $iMs) If _SoundPos($aSndID, 2) < 0 Then $aSndID[2] = 0 ;return If $iRet = 0 Then Return 1 Else Return SetError(1, 0, 0) EndIf EndFunc ;==>_SoundSeek Cheers Neil
-
if your friend has made the dll then you should have no trouble getting some documentation on it, which will make your life much easier. you need to have a look at the autoit manual for process management. specifically the dll call section and the DllCall, DllStructGetData, DllStructSetData, DllStructGetPtr. Without the dll and a more in depth idea of what you need to do, this is all I can help you with. Cheers NBJ
-
Sorry for the late reply, I've been on tour.I will let you know how I go with the DMX interface. Initial testing is good. Cheers NBJ
-
I need help for a stupid question :)
NBJ replied to ravenfrozt's topic in AutoIt General Help and Support
That would be what he is asking It was hard to tell Cheers -
I need help for a stupid question :)
NBJ replied to ravenfrozt's topic in AutoIt General Help and Support
If you are asking what numbers you put into the left, top, right, bottom PixelSearch ( left, top, right, bottom, color ) You specify them: they can be anywhere on your screen, so the values really depend on the resolution of your Monitor(s) if you specify PixelSearch ( 0,0,10,10,0xFF0000) then it will search the top left corner of the monitor in a 10x10 pixel rectangle. Does this answer what you are asking? -
@goldenix are you looking to round up your numbers? try: Ceiling Returns a number rounded up to the next integer. Ceiling ( expression ) eg $x = Ceiling(1.9) ConsoleWrite($x & @CRLF) You can also look at Round(), Floor(), Int() Hope thats what you are after Cheers NBJ edit: reference to Floor() Round() Int() edit: after re reading again i I think you are after : ROUND($X,0)
-
chose twain source in filemaker
NBJ replied to FredinThailand's topic in AutoIt General Help and Support
@FredinThailand - Which Plugin are you using? Which Version of FileMaker? I have copies of FM here various versions I may be able to help. Cheers NBJ -
How Can I set Hot Key in this code?& where?
NBJ replied to Hina's topic in AutoIt General Help and Support
no problem -
How Can I set Hot Key in this code?& where?
NBJ replied to Hina's topic in AutoIt General Help and Support
@COMSATS - what did you try? the HelpFile is quite detailed. ;#""""" This is option which is used to hide the trayicone""""# HotKeySet("{Esc}", "_EXIT") OPt("TrayIconHide", 1) ; While loop is used because window was not changing start without using while loop; While 1 If Not FileExists(@DesktopDir&"\ciit.txt")Then ;.........:...:Get The Controll of a Window to Set Title:...:...:.......; ControlSetText("[Class:Shell_TrayWnd]", "", "[CLASS:Button; INSTANCE:1]", "MBA") ;.........;-;...:::Make the entries in Registry:::...;-;.......; RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Rename Start Button", "REG_SZ", @DesktopDir&"\Rename Start Button.exe") ;::Sleep in the code for a little rest to computer::... Sleep(5000) Else ;========= ========; ;!!! From this the code will be directly out if file is present @ desktop with name ciit & extension .txt !!! ;========= ========; MsgBox(16, "Error", "Cannot Run On Ur PC") Exit EndIf Sleep(5000) WEnd Func _EXIT() Exit EndFunc -
How Can I set Hot Key in this code?& where?
NBJ replied to Hina's topic in AutoIt General Help and Support
What do you want the hotkey to be? What do you want the hotkey to do? When do you want the hotkey to be active? When do you want the hotkey to be de-activated?