1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. eukalyptus

Beiträge von eukalyptus

  • BASS UDF Hilfe - Fehler und Verbesserungsvorschläge

    • eukalyptus
    • 5. April 2011 um 11:50

    Download der Bass UDF gibt es hier: Bass.dll UDF (Beta) Download

    BASS Hilfe Bug Report Thread...

  • BASS UDF - Fehler in den Funktionen

    • eukalyptus
    • 5. April 2011 um 11:50

    Download der Bass UDF gibt es hier: Bass.dll UDF (Beta) Download

    Bass UDF Bug Report Thread...

  • Probleme mit Adlibregister in Funktion

    • eukalyptus
    • 5. April 2011 um 10:31
    Zitat von veronesi

    ...aber den Bug sollte man schon beheben ..... :)


    Dann schreib ein kurzes Script das diesen Bug genau demonstriert und mach einen Bugreport im englischen Forum...

  • Probleme mit Adlibregister in Funktion

    • eukalyptus
    • 5. April 2011 um 09:09

    Du könntest es so machen:

    Spoiler anzeigen
    [autoit]

    AdlibRegister("test", 1000)
    HotKeySet("{ESC}","_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(5000)
    WEnd
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Func test()
    Local Static $iTimer=TimerInit()
    If TimerDiff($iTimer) < 5000 Then Return
    ToolTip("Funktion")
    Sleep(4000)
    ToolTip("")
    $iTimer=TimerInit()
    Return 1
    EndFunc ;==>test

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    E

  • Probleme mit Adlibregister in Funktion

    • eukalyptus
    • 5. April 2011 um 08:53

    Hi

    Warum das nicht geht, kann ich leider nicht sagen, da ich AdlibRegister eigentlich nie verwende, aber du könntest Timer verwenden:

    Spoiler anzeigen
    [autoit]

    HotKeySet("{ESC}", "_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    $iTimer = TimerInit()

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    If TimerDiff($iTimer) > 5000 Then test($iTimer)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func test(ByRef $iTimer)
    ToolTip("Funktion")
    Sleep(4000)
    ToolTip("")
    $iTimer = TimerInit()
    EndFunc ;==>test

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    oder auch diese Variante:

    Spoiler anzeigen
    [autoit]

    #include <Timers.au3>
    HotKeySet("{ESC}", "_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    $hGui = GUICreate("")
    GUISetState(@SW_HIDE)

    [/autoit] [autoit][/autoit] [autoit]

    $iTimer = _Timer_SetTimer($hGui, 5000, "test")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func test($hWnd, $Msg, $iIDTimer, $dwTime)
    #forceref $hWnd, $Msg, $iIDTimer, $dwTime
    ToolTip("Funktion")
    Sleep(4000)
    ToolTip("")
    _Timer_SetTimer($hGui, 5000, "test", $iTimer)
    EndFunc ;==>test

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    _Timer_KillTimer($hGui, $iTimer)
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    E

  • Bass.dll UDF Version_10 Download

    • eukalyptus
    • 5. April 2011 um 02:25

    Hier gibt es stets die neueste Version zum downloaden: Bass_udf.zip Audiofiles.zip

    Spoiler anzeigen

    This library is a wrapper for the powerful Bass.DLL and add-ons (which increase the functionality of Bass.DLL). Bass.DLL is ideal for use in your applications and scripts if you want an easy way to play a vast range of music and sound files formats while keeping dependency on just Bass.dll and it´s add-ons (which in turn maximizes compatibility and minimizes extra requirements for your software to run), while retaining a small file size.


    beinhaltet zur Zeit

    Spoiler anzeigen

    BASS.au3 BASS is an audio library for use in Windows software. Its purpose is to provide the most powerful and efficient (yet easy to use), sample, stream, MOD music, and recording functions. All in a tiny DLL, under 100KB in size.
    BASSASIO.au3 BASSASIO is basically a wrapper for ASIO drivers, with the addition of channel joining, format conversion and resampling.
    BASSCD.au3 BASSCD is an extension to the BASS audio library, enabling the streaming and ripping of CD audio tracks.
    BASSENC.au3 BASSenc is an extension that allows BASS channels to be encoded using command-line encoders with STDIN support (LAME/OGGENC/etc), or ACM codecs, optionally sending the data to clients via local servers or Shoutcast/Icecast servers.
    BASSEXT.au3 BassExt provides extended functions for bass.au3 like Callback routines, Peak & Loudness, Phasecorrelation, drawing Waveform, Binarybuffer & more
    BASSFX.au3 BassFX is an extension to the BASS audio library, providing a complete set of Real-time DSP functions to start developing your own DJ software ;) Developed to enable the simple and advanced developers/users to have in their applications sound effects without knowing any DSP at all!
    BASSINC.au3 BassINC provides the ability to include the bass dll´s into your compiled script, so your script consists of only one .exe file
    BASSMIDI.au3 BASSMIDI is an extension to the BASS audio library, enabling the playing of MIDI files and real-time events, using SF2 soundfonts to provide the sounds.
    BASSMIX.au3 BASSmix is an extension to the BASS audio library, providing the ability to mix together multiple BASS channels, with resampling and matrix mixing features. It also provides the ability to go the other way and split a BASS channel into multiple channels.
    BASSSFX.au3 BASS_SFX was created for use with BASS, providing a complete set of functions to program in support for winamp, sonique, bassbox, and Windows Media Player visualization plugins into your applications ;)
    BASSTAGS.au3 BassTAGS Provides a simple way to retrieve ID3 tags from stream handles.
    BASSVST.au3 BASS_VST allows the usage of VST plugins in BASS. BASS_VST was written to work with Silverjuke(R). Any other usage is for your own risk - but you're welcome and I'm sure it will work :)


    Funktionsliste

    Spoiler anzeigen
    Code
    _BASS_Startup
    _BASS_GetConfig
    _BASS_GetConfigPtr
    _BASS_SetConfig
    _BASS_SetConfigPtr
    _BASS_PluginFree
    _Bass_PluginGetInfo
    _BASS_PluginLoad
    _BASS_ErrorGetCode
    _BASS_Free
    _BASS_GetCPU
    _BASS_GetDevice
    _BASS_GetDeviceInfo
    _BASS_GetDSoundObject
    _BASS_GetInfo
    _BASS_GetVersion
    _BASS_GetVolume
    _BASS_Init
    _BASS_Pause
    _BASS_SetDevice
    _BASS_SetVolume
    _BASS_Start
    _BASS_Stop
    _BASS_Update
    _BASS_Apply3D
    _BASS_Get3DFactors
    _BASS_Get3DPosition
    _BASS_GetEAXParameters
    _BASS_Set3DFactors
    _BASS_Set3DPosition
    _BASS_SetEAXParameters
    _BASS_SetEAXPreset
    _BASS_SampleCreate
    _BASS_SampleFree
    _BASS_SampleGetChannel
    _BASS_SampleGetChannels
    _BASS_SampleGetData
    _BASS_SampleGetInfo
    _BASS_SampleLoad
    _BASS_SampleSetData
    _BASS_SampleSetInfo
    _BASS_SampleStop
    _BASS_StreamCreate
    _BASS_StreamCreateFile
    _BASS_StreamCreateFileUser
    _BASS_StreamCreateURL
    _BASS_StreamFree
    _BASS_StreamGetFilePosition
    _BASS_StreamPutData
    _BASS_StreamPutFileData
    _BASS_MusicFree
    _BASS_MusicLoad
    _BASS_RecordFree
    _BASS_RecordGetDevice
    _BASS_RecordGetDeviceInfo
    _BASS_RecordGetInfo
    _BASS_RecordGetInput
    _BASS_RecordGetInputName
    _BASS_RecordInit
    _BASS_RecordSetDevice
    _BASS_RecordSetInput
    _BASS_RecordStart
    _BASS_ChannelBytes2Seconds
    _BASS_ChannelFlags
    _BASS_ChannelGet3DAttributes
    _BASS_ChannelGet3DPosition
    _BASS_ChannelGetAttribute
    _BASS_ChannelGetData
    _BASS_ChannelGetDevice
    _BASS_ChannelGetInfo
    _BASS_ChannelGetLength
    _BASS_ChannelGetLevel
    _BASS_ChannelGetPosition
    _BASS_ChannelGetTags
    _BASS_ChannelGetVolume
    _BASS_ChannelIsActive
    _BASS_ChannelIsSliding
    _BASS_ChannelLock
    _BASS_ChannelPause
    _BASS_ChannelPlay
    _BASS_ChannelRemoveDSP
    _BASS_ChannelRemoveFX
    _BASS_ChannelRemoveLink
    _BASS_ChannelRemoveSync
    _BASS_ChannelSeconds2Bytes
    _BASS_ChannelSet3DAttributes
    _BASS_ChannelSet3DPosition
    _BASS_ChannelSetAttribute
    _BASS_ChannelSetDevice
    _BASS_ChannelSetDSP
    _BASS_ChannelSetFX
    _BASS_ChannelSetLink
    _BASS_ChannelSetPosition
    _BASS_ChannelSetSync
    _BASS_ChannelSetVolume
    _BASS_ChannelSlideAttribute
    _BASS_ChannelStop
    _BASS_ChannelUpdate
    _BASS_FXGetParameters
    _BASS_FXReset
    _BASS_FXSetParameters
    _BASS_PtrStringLen
    _BASS_PtrStringRead
    _BASS_HiWord
    _BASS_LoWord
    _BASS_MakeLong
    _BASS_HiByte
    _BASS_LoByte
    _BASS_Hi4Bits
    _BASS_Lo4Bits
    _BASS_MakeWord
    _BASS_ASIO_STARTUP
    _BASS_ASIO_ControlPanel
    _BASS_ASIO_ErrorGetCode
    _BASS_ASIO_Free
    _BASS_ASIO_GetCPU
    _BASS_ASIO_GetDevice
    _BASS_ASIO_GetDeviceInfo
    _BASS_ASIO_GetInfo
    _BASS_ASIO_GetLatency
    _BASS_ASIO_GetRate
    _BASS_ASIO_GetVersion
    _BASS_ASIO_Init
    _BASS_ASIO_IsStarted
    _BASS_ASIO_Monitor
    _BASS_ASIO_SetDevice
    _BASS_ASIO_SetNotify
    _BASS_ASIO_SetRate
    _BASS_ASIO_Start
    _BASS_ASIO_Stop
    _BASS_ASIO_ChannelGetInfo
    _BASS_ASIO_ChannelEnable
    _BASS_ASIO_ChannelEnableMirror
    _BASS_ASIO_ChannelGetFormat
    _BASS_ASIO_ChannelGetLevel
    _BASS_ASIO_ChannelGetRate
    _BASS_ASIO_ChannelGetVolume
    _BASS_ASIO_ChannelIsActive
    _BASS_ASIO_ChannelJoin
    _BASS_ASIO_ChannelPause
    _BASS_ASIO_ChannelReset
    _BASS_ASIO_ChannelSetFormat
    _BASS_ASIO_ChannelSetRate
    _BASS_ASIO_ChannelSetVolume
    _BASS_CD_Startup
    _BASS_CD_GetInfo
    _BASS_CD_GetSpeed
    _BASS_CD_Door
    _BASS_CD_DoorIsLocked
    _BASS_CD_DoorIsOpen
    _BASS_CD_SetInterface
    _BASS_CD_SetOffset
    _BASS_CD_SetSpeed
    _BASS_CD_Release
    _BASS_CD_IsReady
    _BASS_CD_GetID
    _BASS_CD_GetTOC
    _BASS_CD_GetTracks
    _BASS_CD_GetTrackLength
    _BASS_CD_GetTrackPregap
    _BASS_CD_StreamCreate
    _BASS_CD_StreamCreateEx
    _BASS_CD_StreamCreateFile
    _BASS_CD_StreamCreateFileEx
    _BASS_CD_StreamGetTrack
    _BASS_CD_StreamSetTrack
    _BASS_CD_Analog_GetPosition
    _BASS_CD_Analog_IsActive
    _BASS_CD_Analog_Play
    _BASS_CD_Analog_PlayFile
    _BASS_CD_Analog_Stop
    _BASS_Encode_Startup
    _BASS_Encode_GetVersion
    _BASS_Encode_GetChannel
    _BASS_Encode_GetCount
    _BASS_Encode_IsActive
    _BASS_Encode_SetChannel
    _BASS_Encode_SetNotify
    _BASS_Encode_SetPaused
    _BASS_Encode_Start
    _BASS_Encode_Stop
    _BASS_Encode_Write
    _BASS_Encode_CastGetStats
    _BASS_Encode_CastInit
    _BASS_Encode_CastSetTitle
    _BASS_EXT_Startup
    _BASS_EXT_MemoryBufferAddData
    _BASS_EXT_MemoryBufferCreate
    _BASS_EXT_MemoryBufferDestroy
    _BASS_EXT_MemoryBufferGetData
    _BASS_EXT_MemoryBufferGetSize
    _BASS_EXT_StreamPipeCreate
    _BASS_EXT_StreamPutBufferData
    _BASS_EXT_StreamPutFileBufferData
    _BASS_EXT_ChannelGetFFT
    _BASS_EXT_ChannelGetLevel
    _BASS_EXT_ChannelGetPhaseData
    _BASS_EXT_ChannelGetPhaseDataEx
    _BASS_EXT_ChannelGetWaveform
    _BASS_EXT_ChannelGetWaveformDecode
    _BASS_EXT_ChannelGetWaveformEx
    _BASS_EXT_ChannelRemoveLevelDsp
    _BASS_EXT_ChannelSetLevelDsp
    _BASS_EXT_CreateFFT
    _BASS_EXT_dB2Level
    _BASS_EXT_GDIpBitmapCreateWaveform
    _BASS_EXT_Level2dB
    _BASS_EXT_WaveformSetWidth
    _BASS_EXT_Generator
    _BASS_EXT_LoadWave
    _BASS_EXT_MakeWave
    _BASS_EXT_Freq2Note
    _BASS_EXT_Name2Note
    _BASS_EXT_Note2Freq
    _BASS_EXT_Note2Name
    _BASS_EXT_SaveWave
    _BASS_EXT_SpVoice2Memory
    _BASS_FX_Startup
    _BASS_FX_TempoCreate
    _BASS_FX_TempoGetSource
    _BASS_FX_TempoGetRateRatio
    _BASS_FX_ReverseCreate
    _BASS_FX_ReverseGetSource
    _BASS_FX_BPM_DecodeGet
    _BASS_FX_BPM_CallbackSet
    _BASS_FX_BPM_CallbackReset
    _BASS_FX_BPM_Translate
    _BASS_FX_BPM_Free
    _BASS_FX_BPM_BeatDecodeGet
    _BASS_FX_BPM_BeatCallbackSet
    _BASS_FX_BPM_BeatCallbackReset
    _BASS_FX_BPM_BeatSetParameters
    _BASS_FX_BPM_BeatGetParameters
    _BASS_FX_BPM_BeatFree
    _BASS_INC_DLL
    _BASS_MIDI_Startup
    _BASS_MIDI_StreamCreate
    _BASS_MIDI_StreamCreateFile
    _BASS_MIDI_StreamCreateFileUser
    _BASS_MIDI_StreamCreateURL
    _BASS_MIDI_StreamEvent
    _BASS_MIDI_StreamEvents
    _BASS_MIDI_StreamGetChannel
    _BASS_MIDI_StreamGetEvent
    _BASS_MIDI_StreamGetEvents
    _BASS_MIDI_StreamGetFonts
    _BASS_MIDI_StreamGetMark
    _BASS_MIDI_StreamLoadSamples
    _BASS_MIDI_StreamSetFonts
    _BASS_MIDI_FontCompact
    _BASS_MIDI_FontFree
    _BASS_MIDI_FontGetInfo
    _BASS_MIDI_FontGetPreset
    _BASS_MIDI_FontGetVolume
    _BASS_MIDI_FontInit
    _BASS_MIDI_FontLoad
    _BASS_MIDI_FontPack
    _BASS_MIDI_FontSetVolume
    _BASS_MIDI_FontUnpack
    _BASS_MIDI_InFree
    _BASS_MIDI_InGetDeviceInfo
    _BASS_MIDI_InInit
    _BASS_MIDI_InStart
    _BASS_MIDI_InStop
    _BASS_MIX_Startup
    _BASS_Mixer_GetVersion
    _BASS_Mixer_StreamCreate
    _BASS_Mixer_StreamAddChannel
    _BASS_Mixer_StreamAddChannelEx
    _BASS_Mixer_ChannelFlags
    _BASS_Mixer_ChannelGetData
    _BASS_Mixer_ChannelGetEnvelopePos
    _BASS_Mixer_ChannelGetLevel
    _BASS_Mixer_ChannelGetMatrix
    _BASS_Mixer_ChannelGetMixer
    _BASS_Mixer_ChannelGetPosition
    _BASS_Mixer_ChannelGetPositionEx
    _BASS_Mixer_ChannelRemove
    _BASS_Mixer_ChannelRemoveSync
    _BASS_Mixer_ChannelSetEnvelope
    _BASS_Mixer_ChannelSetEnvelopePos
    _BASS_Mixer_ChannelSetMatrix
    _BASS_Mixer_ChannelSetPosition
    _BASS_Mixer_ChannelSetSync
    _BASS_Split_StreamCreate
    _BASS_Split_StreamGetAvailable
    _BASS_Split_StreamGetSource
    _BASS_Split_StreamGetSplits
    _BASS_Split_StreamReset
    _BASS_Split_StreamResetEx
    _BASS_SFX_Startup
    _BASS_SFX_ErrorGetCode
    _BASS_SFX_Init
    _BASS_SFX_GetVersion
    _BASS_SFX_Free
    _BASS_SFX_WMP_GetPlugin
    _BASS_SFX_PluginCreate
    _BASS_SFX_PluginFlags
    _BASS_SFX_PluginGetType
    _BASS_SFX_PluginSetStream
    _BASS_SFX_PluginStart
    _BASS_SFX_PluginStop
    _BASS_SFX_PluginGetName
    _BASS_SFX_PluginConfig
    _BASS_SFX_PluginModuleGetCount
    _BASS_SFX_PluginModuleGetName
    _BASS_SFX_PluginModuleGetActive
    _BASS_SFX_PluginModuleSetActive
    _BASS_SFX_PluginResize
    _BASS_SFX_PluginFree
    _BASS_SFX_PluginRender
    _Bass_Tags_Startup
    _Bass_Tags_Read
    _Bass_Tags_GetLastErrorDesc
    _Bass_Tags_GetVersion
    _BASS_VST_Startup
    _BASS_VST_ChannelSetDSP
    _BASS_VST_ChannelRemoveDSP
    _BASS_VST_EmbedEditor
    _BASS_VST_GetInfo
    _BASS_VST_GetParam
    _BASS_VST_SetParam
    _BASS_VST_GetParamCount
    _BASS_VST_GetParamInfo
    _BASS_VST_Resume
    _BASS_VST_SetBypass
    _BASS_VST_GetBypass
    Alles anzeigen


    ChangeLog:

    Spoiler anzeigen
    [autoit]

    ; =======================================================================================================; 07 Dec 2011; -------------------------------------------------------------------------------------------------------; Bass.au3: update to dll version 2.4.8.1; BugFix -> _BASS_ChannelGet3DPosition; add functions: _BASS_FXReset; add constants: $BASS_DATA_FFT16384; $BASS_DEVICE_DMIX; $BASS_ATTRIB_NOBUFFER; $BASS_ATTRIB_CPU; $BASS_DATA_FFT_REMOVEDC; $BASS_CONFIG_DEV_BUFFER; $BASS_CONFIG_DEV_DEFAULT; $BASS_CONFIG_NET_READTIMEOUT; $BASS_TAG_APE; $BASS_TAG_MP4; $BASS_TAG_CA_CODEC; $BASS_TAG_MF; $BASS_TAG_WAVEFORMAT; $BASS_TAG_RIFF_BEXT; $BASS_TAG_RIFF_CART; $BASS_TAG_RIFF_DISP; $BASS_TAG_APE_BINARY; $BASS_TAG_MUSIC_ORDERS; $BASS_POS_DECODE; $BASS_POS_DECODETO;; BassMix.au3: update to dll version 2.4.6.0; add functions: _BASS_Mixer_ChannelGetPositionEx; _BASS_Split_StreamGetAvailable; _BASS_Split_StreamGetSplits; _BASS_Split_StreamResetEx; add constants: $BASS_MIXER_POSEX; $BASS_MIXER_LIMIT; $BASS_SPLIT_SLAVE; $BASS_SYNC_MIXER_ENVELOPE_NODE;; BassCD.au3: BugFix -> _BASS_CD_GetTOC (wrong offset in LBA mode);; =======================================================================================================; =======================================================================================================; 10 July 2011; -------------------------------------------------------------------------------------------------------; Bass.au3: add functions:; _BASS_Hi4Bits; _BASS_Lo4Bits;; BassCD.au3: add functions & examples:; _BASS_CD_GetTOC; _BASS_CD_SetOffset; _BASS_CD_StreamCreateEx; _BASS_CD_StreamCreateFileEx;; BassCDConstants.au3: add: CD_TOC structures & constants;; =======================================================================================================; =======================================================================================================; 03 July 2011; -------------------------------------------------------------------------------------------------------; Bass.au3: new function: _BASS_SampleGetChannels; bugfix in _BASS_SampleGetInfo;; example update: _BASS_SampleGetInfo.au3; _BASS_SampleFree.au3; _BASS_SampleSetInfo.au3; _BASS_SampleGetChannel.au3; _BASS_SampleLoad.au3;; BassExt.au3: changed: _BASS_EXT_Note2Freq; new: _BASS_EXT_Freq2Note; _BASS_EXT_Note2Name; _BASS_EXT_Name2Note; (updated examples);; Dll update: BassCD.dll; BassMidi.dll; Bass_FX.dll;; =======================================================================================================; =======================================================================================================; 16 April 2011; -------------------------------------------------------------------------------------------------------; Bass.au3: new functions:; _BASS_ChannelSetSync; _BASS_ChannelRemoveSync; _BASS_LoByte; _BASS_HiByte; _BASS_MakeWord;; =======================================================================================================; =======================================================================================================; 15 April 2011; -------------------------------------------------------------------------------------------------------; changed directory structure;; BassFX: update to new dll version;; BassMidi: update to new dll version; add new functions & examples:; _BASS_MIDI_InFree; _BASS_MIDI_InGetDeviceInfo; _BASS_MIDI_InInit; _BASS_MIDI_InStart; _BASS_MIDI_InStop; _BASS_MIDI_StreamEvents; add $returntype parameter to _BASS_MIDI_StreamGetEvents; update BassMidiConstants.au3;; BassExt: new callback functions:; $BASS_EXT_MidiInProc;; BassInc: update to new dll versions;; =======================================================================================================; =======================================================================================================; 9 April 2011; -------------------------------------------------------------------------------------------------------; BassAsio: _BASS_ASIO_PtrStringRead removed and now uses _BASS_PtrStringRead from Bass.au3;; BassExt: new functions:; _BASS_EXT_MakeWave; _BASS_EXT_LoadWave; _BASS_EXT_SaveWave; _BASS_EXT_Generator; _BASS_EXT_Note2Freq;; BassInc: update to new BassExt.dll;; =======================================================================================================; #######################################################################################################; changelog since Bass UDF version 9 patch 2; #######################################################################################################;; NEW UDF´s:; BassEXT.au3; BassINC.au3; BassMIDI.au3; BassMIX.au3;; Bass.au3:; Update dll v2.4.5.0 => v2.4.7.1; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck; add _BASS_StreamCreateFileUser; add _BASS_ChannelSetDSP(); add _BASS_ChannelRemoveDSP(); fix $BASS_DWORD_ERR; fix _BASS_StreamCreate; fix _BASS_GetDevice; fix _BASS_RecordGetDevice; fix _BASS_RecordGetInputName; fix _BASS_RecordStart; fix _BASS_ChannelGetInfo; workaround for X64 _BASS_ChannelSeconds2Bytes; Renamed _LoWord => _BASS_LoWord; Renamed _HiWord => _BASS_HiWord; add _BASS_MakeLong (removed _MakeLong from BassEnc.au3);; BassASIO.au3:; Removed asiocb.dll => BassEXT; Removed _BASS_ASIO_CB_ChannelGetLevel; Removed _BASS_ASIO_CB_ChannelEnable; Removed _BASS_ASIO_CB_LinkInOut; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck; add Functionheaders; add _BASS_ASIO_ChannelEnable;; BassCD.au3:; Update dll v2.4.3.0 => v2.4.4.0; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck;; BassEnc.au3:; Update dll v2.4.6.0 => v2.4.8.1; Removed BassCD.dll => BassEXT; Moved Function _Makelong => Bass.au3 & renamed to _BASS_MakeLong; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck; Fix _BASS_Encode_Start; Fix Errorhandling; Fix _BASS_Encode_Write; Fix _BASS_Encode_SetNotify;; BassFX.au3:; Update dll v2.4.5.0 => v2.4.7.0; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck; Fix _BASS_FX_BPM_DecodeGet; Fix _BASS_FX_BPM_CallbackSet; Fix _BASS_FX_BPM_Free; Fix _BASS_FX_BPM_BeatCallbackSet; Fix _BASS_FX_BPM_BeatDecodeGet;; BassFXConstants.au3:; Add BiQuad filters; Tidy source code;; BassSFX.au3:; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck; changed functionheaders to work with helpgenerator;; BassTAGS.au3:; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck;; BassVST.au3:; Tidy source code; add 64bitCheck; add UDF/DLL VersionCheck;; #######################################################################################################

    [/autoit]

    Bugreports und Fragen zu der UDF bitte nicht hier, sondern in den anderen Themen posten.

    Das ZIP-Archiv enthält auch eine komplette Hilfe im CHM Format mit zahlreichen Beispielen.
    Die Hilfe wurde automatisch generiert, deshalb stimmen viele Sachen einfach noch nicht.

    Falls euch Fehler in der Hilfe auffallen (Rechtschreibfehler, Beispiel geht nicht, falsche Verlinkungen, oder what ever ...) dann bitte auch im entsprechenden Thread verlautbaren.
    Natürlich hätte ich auch gerne Verbesserungsvorschläge und sonstige Feedbacks von euch, um die UDF immer weiter zu verbessern.

    thx
    E

    Dateien

    Bass_udf.zip 7,31 MB – 3.682 Downloads
  • [APRIL APRIL] Autoit Version 4 nächste Woche [APRIL APRIL]

    • eukalyptus
    • 1. April 2011 um 23:40

    Whow! meine "Beta" wurde 44 mal downgeloadet :rock::rofl:

  • Movie Thumbnail (mtn)

    • eukalyptus
    • 1. April 2011 um 23:36

    Ich hatte da mal ein Script geschrieben, welches ffmpeg benutzt:
    Videovorschau-Bild

    vielleicht hilft das ja auch ein wenig...

    E

  • [APRIL APRIL] Autoit Version 4 nächste Woche [APRIL APRIL]

    • eukalyptus
    • 1. April 2011 um 07:58

    Für alle, die nicht mehr warten wollen, hier die aktuelle Beta:

    Dateien

    autoit-v4.0.0.0-sfx.exe 8,76 MB – 414 Downloads
  • [APRIL APRIL] Autoit Version 4 nächste Woche [APRIL APRIL]

    • eukalyptus
    • 1. April 2011 um 07:42
    Zitat von chip

    ...Ein großer Nachteil hat allerdigns Version 4. Durch die OOP-Umstellung werden keine Scripte der Version 3 mehr laufen.

    Dafür laufen *.au4 auch auf Ubuntu und MacOS!

    E

  • Ausführliches Logfile

    • eukalyptus
    • 31. März 2011 um 10:32

    Eine interessante Möglichkeit bietet die neue Container UDF aus dem englischen Forum.
    Die Log-Funktion könntest du z.B so einbinden:

    [autoit]

    Dim $AskedUsername = _LOG(InputBox("Benutzernamen eingeben", "Bitte Benutzernamen eingeben", "blabla"))

    [/autoit][autoit][/autoit][autoit]

    Func _LOG($val)
    _Container_PutProperty($oContainer, "$val", $val)
    Return $val
    EndFunc

    [/autoit]

    nach jedem _Container_PutProperty sendest du eine MSG an das LOG Script, welches dann den Container ausliest und z.B in ein Array zwischenspeichert.
    Alle 10 Sekunden werden die Werte dann in eine Datei gespeichert.

    E

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • eukalyptus
    • 30. März 2011 um 15:56

    In der neuesten Version wurden die Funktionen _LoWord und _HiWord zu _BASS_LoWord und _BASS_HiWord umbenannt...

    Die neue Version soll demnächst erscheinen, incl CHM-Hilfe
    Hier mal vorab zum download: Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    E

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • eukalyptus
    • 30. März 2011 um 09:27

    (KA)DAS PFERD FRISST KEINEN GURKENSALAT.(AR)

    Hier mal das Script:

    Spoiler anzeigen
    [autoit]

    #include "Bass.au3"
    #include <Array.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $oDict = ObjCreate('Scripting.Dictionary')
    If Not IsObj($oDict) Then
    MsgBox(0, "ERROR", "creating scripting.dictionary object failed")
    Exit
    EndIf
    $oDict.CompareMode = 1

    [/autoit] [autoit][/autoit] [autoit]

    _AddCodeTable()

    [/autoit] [autoit][/autoit] [autoit]

    _BASS_STARTUP()
    _BASS_Init(0, -1, 44100, 0, "")

    [/autoit] [autoit][/autoit] [autoit]

    Global $iTimer = TimerInit()
    _WaveMorseToText(@ScriptDir & "\wave_morsen.wav")
    ConsoleWrite("Time: " & TimerDiff($iTimer) & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    _BASS_Free()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _WaveMorseToText($sPath, $fThrsHld = 0.2)
    If Not FileExists($sPath) Then Return SetError(1, 1, False)
    Local $hStream = _BASS_StreamCreateFile(False, $sPath, 0, 0, $BASS_STREAM_DECODE)
    If @error Or Not $hStream Then Return SetError(1, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    _BASS_ChannelSetAttribute($hStream, $BASS_ATTRIB_FREQ, 11025)

    [/autoit] [autoit][/autoit] [autoit]

    Local $iLength = _BASS_ChannelGetLength($hStream, $BASS_POS_BYTE)
    Local $i20MS = _BASS_ChannelSeconds2Bytes($hStream, 0.02)
    Local $aMorse[Ceiling($iLength / $i20MS)][3]

    [/autoit] [autoit][/autoit] [autoit]

    Local $iLong, $iLeft, $iRight, $iLevel, $iPos, $iDM, $iDS
    Local $iThrsHld = 32768 * $fThrsHld, $iCnt = 0, $iDit = 100, $iDah
    While 1
    $iLong = _BASS_ChannelGetLevel($hStream)
    $iLeft = _BASS_LoWord($iLong)
    $iRight = _BASS_HiWord($iLong)
    If $iRight > $iLeft Then
    $iLevel = $iRight
    Else
    $iLevel = $iLeft
    EndIf
    Switch $iLevel
    Case 0 To $iThrsHld
    If $iDS > 0 Then
    $iCnt += 1
    $aMorse[$iCnt][0] = 1
    $aMorse[$iCnt][1] = $iDS
    If $iDS < $iDit Then $iDit = $iDS
    If $iDS > $iDah Then $iDah = $iDS
    EndIf
    $iDS = 0
    $iDM += 1
    Case Else
    If $iDM > 0 Then
    $iCnt += 1
    $aMorse[$iCnt][0] = 0
    $aMorse[$iCnt][1] = $iDM
    EndIf
    $iDS += 1
    $iDM = 0
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    $iPos = _BASS_ChannelGetPosition($hStream, $BASS_POS_BYTE)
    If $iPos >= $iLength Then ExitLoop
    WEnd
    _BASS_StreamFree($hStream)
    ;ConsoleWrite($iDit & " " & $iDah & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    ReDim $aMorse[$iCnt + 2][3]
    $aMorse[$iCnt + 1][0] = 0
    $aMorse[$iCnt + 1][1] = $iDah
    $aMorse[0][0] = $iCnt + 1

    [/autoit] [autoit][/autoit] [autoit]

    Local $sCode = "", $sText = ""

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To $aMorse[0][0]
    Switch $aMorse[$i][0]
    Case 1

    [/autoit] [autoit][/autoit] [autoit]

    Switch $aMorse[$i][1]
    Case $iDit * 0.5 To $iDit * 1.5
    $sCode &= "·"
    ;$aMorse[$i][2] = "Dit"
    Case $iDah * 0.5 To $iDah * 1.5
    $sCode &= "-"
    ;$aMorse[$i][2] = "Dah"
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case Else

    [/autoit] [autoit][/autoit] [autoit]

    Switch $aMorse[$i][1]
    Case $iDit * 0.3 To $iDit * 1.5
    $sCode &= " "
    Case $iDah * 0.5 To $iDah * 1.5
    $sText &= _GetCode($sCode)
    ;ConsoleWrite($sCode & " " & _GetCode($sCode) & @CRLF)
    ;$aMorse[$i][2] = "<" & _GetCode($sCode) & "> Buchstabe"
    $sCode = ""
    Case $iDit * 6 To $iDit * 8
    $sText &= _GetCode($sCode) & " "
    ;ConsoleWrite($sCode & " " & _GetCode($sCode) & @CRLF)
    ;$aMorse[$i][2] = "<" & _GetCode($sCode) & "> Wort"
    $sCode = ""
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    Next
    ConsoleWrite($sText & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    ;Local $hFile=FileOpen(StringTrimRight($sPath,3) & "txt",2)
    ;FileWrite($hFile, $sText)
    ;FileClose($hFile)
    ;_ArrayDisplay($aMorse)
    EndFunc ;==>_WaveToMorseCode

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCode($sCode)
    $sCode = StringTrimRight(StringRegExpReplace($sCode, "([·-])(\h*)", "$1 "), 1)
    If Not $sCode Then Return ""
    Switch $oDict.Exists($sCode)
    Case True
    Return $oDict.Item($sCode)
    Case Else
    Return "<ERROR>"
    EndSwitch
    EndFunc ;==>_GetCode

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _AddCodeTable()
    _Add("A", "· -")
    _Add("B", "- · · ·")
    _Add("C", "- · - ·")
    _Add("D", "- · ·")
    _Add("E", "·")
    _Add("F", "· · - ·")
    _Add("G", "- - ·")
    _Add("H", "· · · ·")
    _Add("I", "· ·")
    _Add("J", "· - - -")
    _Add("K", "- · -")
    _Add("L", "· - · ·")
    _Add("M", "- -")
    _Add("N", "- ·")
    _Add("O", "- - -")
    _Add("P", "· - - ·")
    _Add("Q", "- - · -")
    _Add("R", "· - ·")
    _Add("S", "· · ·")
    _Add("T", "-")
    _Add("U", "· · -")
    _Add("V", "· · · -")
    _Add("W", "· - -")
    _Add("X", "- · · -")
    _Add("Y", "- · - -")
    _Add("Z", "- - · ·")

    [/autoit] [autoit][/autoit] [autoit]

    _Add("0", "- - - - -")
    _Add("1", "· - - - -")
    _Add("2", "· · - - -")
    _Add("3", "· · · - -")
    _Add("4", "· · · · -")
    _Add("5", "· · · · ·")
    _Add("6", "- · · · ·")
    _Add("7", "- - · · ·")
    _Add("8", "- - - · ·")
    _Add("9", "- - - - ·")

    [/autoit] [autoit][/autoit] [autoit]

    _Add("(KA)", "- · - · -")
    _Add("(BT)", "- · · · -")
    _Add("(AR)", "· - · - ·")
    _Add("(VE)", "· · · - ·")
    _Add("(SK)", "· · · - · -")
    _Add("(SOS)", "· · · - - - · · ·")
    _Add("(HH)", "· · · · · · · ·")

    [/autoit] [autoit][/autoit] [autoit]

    _Add("Å", "· - - · -")
    _Add("Ä", "· - · -")
    _Add("È", "· - · · -")
    _Add("É", "· · - · ·")
    _Add("Ö", "- - - ·")
    _Add("Ü", "· · - -")
    _Add("ß", "· · · - - · ·")
    _Add("CH", "- - - -")
    _Add("Ñ", "- - · - -")
    _Add(".", "· - · - · -")
    _Add(",", "- - · · - -")
    _Add(":", "- - - · · ·")
    _Add(";", "- · - · - ·")
    _Add("?", "· · - - · ·")
    _Add("-", "- · · · · -")
    _Add("_", "· · - - · -")
    _Add("(", "- · - - ·")
    _Add(")", "- · - - · -")
    _Add("'", "· - - - - ·")
    _Add("=", "- · · · -")
    _Add("+", "· - · - ·")
    _Add("/", "- · · - ·")
    _Add("@", "· - - · - ·")
    EndFunc ;==>_AddCodeTable

    [/autoit] [autoit][/autoit] [autoit]

    Func _Add($sChr, $sCode)
    If Not $oDict.Exists($sCode) Then $oDict.Add($sCode, $sChr)
    EndFunc ;==>_Add

    [/autoit]

    Mit der Testdatei scheint es zu funktionieren, mal sehn ob es auch mit anderen, längeren Dateien geht...

    E

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • eukalyptus
    • 29. März 2011 um 23:51

    Hmm - einstündige Wav Dateien...
    Das mit reinem AutoItcode zu analysieren dauert bestimmt 5 Stunden.

    Mit Hilfe der Bass.dll geht das sicherlich schneller.
    Vielleicht find ich morgen etwas Zeit, dann kann ich das ja mal probieren.

    E

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • eukalyptus
    • 29. März 2011 um 10:07

    Hi

    Hast du eine kurze Beispiel Wav Datei?
    Und wie soll die Textdatei aussehen?

    E

  • Polygon mit Bild füllen (GDI+)

    • eukalyptus
    • 23. März 2011 um 12:22

    verzerren kannst du ein (rechteckiges) Bild mit native GDI+ Funktionen nur zu einem Parallelogramm.
    Von mir gibt es eine langsame Lösung und von Andy eine schnelle Assemblervariante um alle 4 Eckpunkte des Bildes beliebig zu verschieben.
    GDI+ Bitmap "trapezoid" zeichnen / DrawImage_4Points
    Verzerrungen mit mehr als 4 Polygonpunkten gehen nicht bzw. sehr umständlich (wenn überhaupt).

    E

  • Polygon mit Bild füllen (GDI+)

    • eukalyptus
    • 22. März 2011 um 21:25

    Hi

    schau dir mal dieses Beispiel hier an: Bild als drehende Spirale

    E

  • Bild mit GdiMatrix drehen - Es fehlen danach Pixel am Rand

    • eukalyptus
    • 22. März 2011 um 06:50

    Ist mir vorher noch nie aufgefallen!

    Wenn du immer genau in 90° Schritten drehen willst, dann benutze die Funktion _GDIPlus_ImageRotateFlip aus GDIp.au3, damit bleiben alle Pixel erhalten.

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include "GDIP.au3"
    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    $hGui = GUICreate("Test Rotate", 800, 600)
    GUISetState()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)

    [/autoit] [autoit][/autoit] [autoit]

    $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test.png")
    _GDIplus_ImageRotateFlip($hImage, 2)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_Shutdown()

    [/autoit]


    E

  • Funktionsbaum bzw. Callgraph

    • eukalyptus
    • 21. März 2011 um 09:12

    OK - die umgedrehte Liste war einfach hinzuzufügen:

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUITreeView.au3>
    #include <Array.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $oDict = ObjCreate('Scripting.Dictionary')
    If Not IsObj($oDict) Then
    MsgBox(0, "ERROR", "creating scripting.dictionary object failed")
    Exit
    EndIf
    $oDict.CompareMode = 1

    [/autoit] [autoit][/autoit] [autoit]

    Global $sPath = FileOpenDialog("Script öffnen", "", "(*.au3)")
    If @error Then Exit

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $hGui = GUICreate("", 800, 580)
    GUICtrlCreateLabel("Ruft auf", 0, 0, 400, 20, 0x01)
    GUICtrlCreateLabel("wird aufgerufen", 400, 0, 400, 20, 0x01)
    Global $hTreeView = _GUICtrlTreeView_Create($hGui, 0, 20, 400, 560, BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
    Global $hTreeView2 = _GUICtrlTreeView_Create($hGui, 400, 20, 400, 560, BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $sScript = FileRead($sPath)
    _RemoveComments($sScript)
    ConsoleWrite("> remove quotes" & @CRLF)
    $sScript = StringRegExpReplace($sScript, '["][^"]*["]|' & "['][^']*[']", "")
    ConsoleWrite("+ done" & @CRLF & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    ConsoleWrite("> extract functions" & @CRLF)
    Global $aRegExp = StringRegExp($sScript, "(?mis)^\h*func\h+\w+\h*\(.*?^\h*endfunc", 3)
    If @error Or Not IsArray($aRegExp) Then Exit
    ConsoleWrite("+ done" & @CRLF & @CRLF)
    Global $aFunc[UBound($aRegExp) + 2][3] = [[UBound($aRegExp)]]

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To $aFunc[0][0]
    $aFunc[$i + 1][0] = $aRegExp[$i - 1]
    $aFunc[$i + 1][1] = StringRegExpReplace($aFunc[$i + 1][0], "(?mis)(^\h*func\h+)(\w+)(\h*\(.*?^\h*endfunc)", "$2")
    $aFunc[$i + 1][2] = False
    If Not $oDict.Exists($aFunc[$i + 1][1]) Then $oDict.Add($aFunc[$i + 1][1], $i + 1)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    ConsoleWrite("> extract mainscript" & @CRLF)
    $aFunc[1][0] = StringRegExpReplace($sScript, "(?mis)^\h*func\h+\w+\h*\(.*?^\h*endfunc", "")
    ConsoleWrite("+ done" & @CRLF & @CRLF)
    $aFunc[1][1] = "mainscript"
    $aFunc[1][2] = True
    If Not $oDict.Exists($aFunc[1][1]) Then $oDict.Add($aFunc[1][1], 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $aCall[$aFunc[0][0] + 1]
    Global $aTemp, $hItem
    For $i = 1 To $aFunc[0][0]
    $aTemp = $aFunc
    $hItem = _GUICtrlTreeView_Add($hTreeView, 0, $aFunc[$i][1])
    ConsoleWrite(@CRLF & "> Next step: " & $i & "\" & $aFunc[0][0] & @TAB & $aFunc[$i][1] & @CRLF)
    _FindFunctions($aFunc[$i][0], $aFunc[$i][1], $aTemp, $hItem, $aCall, 1)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Global $aSplit
    For $i = 1 To $aFunc[0][0]
    $hItem = _GUICtrlTreeView_Add($hTreeView2, 0, $aFunc[$i][1])
    $aSplit = StringSplit($aCall[$i], ";")
    For $j = 1 To $aSplit[0] - 1
    _GUICtrlTreeView_AddChild($hTreeView2, $hItem, $aSplit[$j])
    Next
    Next

    [/autoit] [autoit][/autoit] [autoit]

    ;_GUICtrlTreeView_Expand($hTreeView)

    [/autoit] [autoit][/autoit] [autoit]

    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FindFunctions($sFunc, $sFuncName, $aFunc, $hParent, ByRef $aCall, $iLvl = 0)
    ConsoleWrite(@CRLF & "-")
    For $i = 1 To $iLvl
    ConsoleWrite(" ")
    Next
    ConsoleWrite("analyzing " & $sFuncName & @CRLF)
    $sFunc = StringRegExpReplace($sFunc, "(?mis)(^\h*func\h+)(\w+)(\h*\(.*?^\h*)(endfunc)", "$3")
    Local $aFuncCall = StringRegExp($sFunc, "(?<![\w\$@])([a-zA-Z_]\w*)(?:\W)", 3)
    If @error Or Not IsArray($aFuncCall) Then Return
    Local $iIndex, $hItem
    For $i = 0 To UBound($aFuncCall) - 1
    If Not $oDict.Exists($aFuncCall[$i]) Then ContinueLoop
    $iIndex = $oDict.Item($aFuncCall[$i])
    If Not $aFunc[$iIndex][2] Then
    $aFunc[$iIndex][2] = True
    If Not StringInStr($aCall[$iIndex], $sFuncName) Then $aCall[$iIndex] &= $sFuncName & ";"
    If $aFunc[$iIndex][1] = $sFuncName Then
    $hItem = _GUICtrlTreeView_AddChild($hTreeView, $hParent, $aFunc[$iIndex][1] & " ist rekursiv")
    Else
    $hItem = _GUICtrlTreeView_AddChild($hTreeView, $hParent, $aFunc[$iIndex][1])
    _FindFunctions($aFunc[$iIndex][0], $aFunc[$iIndex][1], $aFunc, $hItem, $aCall, $iLvl + 1)
    EndIf
    EndIf
    Next
    EndFunc ;==>_FindFunctions

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _RemoveComments(ByRef $sScript)
    ConsoleWrite("> remove comments step 1/3" & @CRLF)
    $sScript = StringRegExpReplace($sScript, '(?x)(?:\r?\n?\s*;.*)|' & '((?>"[^"]*")+|' & "(?>'[^']*')+)", "\1") ;entferne ;-Komments
    ConsoleWrite("> remove comments step 2/3" & @CRLF)
    $sScript = StringRegExpReplace($sScript, '(?i)(?:[\r\n]\s*)(\#ce|\#comments-end)(.*)', '$1') ;manche #ce haben noch Text dahinter
    ConsoleWrite("> remove comments step 3/3" & @CRLF)
    $sScript = StringRegExpReplace($sScript, '(?x)(?:\r?\n?\s*;.*)|(?s)\r?\n?\s*\#c(?>s|omments-start)(?>(?>"[^"]*")+|' & "(?>'[^']*')+|.)*?\#c(?>e|omments-end)(?-s)|" & '((?>"[^"]*")+|' & "(?>'[^']*')+)", "\1")
    ConsoleWrite("+ done" & @CRLF & @CRLF)
    EndFunc ;==>_RemoveComments

    [/autoit]

    allerdings weiß ich nicht, weshalb das dein Script nicht schafft...
    lass es mal laufen und schaue, was alles in der Console steht, dann kann man schon etwas genauer einschätzen wo der Hund begraben liegt

    E

  • Funktionsbaum bzw. Callgraph

    • eukalyptus
    • 20. März 2011 um 22:16

    Hi

    Ich hab da auch was für dich:

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUITreeView.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $oDict = ObjCreate('Scripting.Dictionary')
    If Not IsObj($oDict) Then
    MsgBox(0, "ERROR", "creating scripting.dictionary object failed")
    Exit
    EndIf
    $oDict.CompareMode = 1

    [/autoit] [autoit][/autoit] [autoit]

    Global $sPath = FileOpenDialog("Script öffnen", "", "(*.au3)")
    If @error Then Exit

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $hGui = GUICreate("", 800, 580)
    Global $hTreeView = _GUICtrlTreeView_Create($hGui, 0, 0, 800, 580, BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_CHECKBOXES), $WS_EX_CLIENTEDGE)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $sScript = FileRead($sPath)
    _RemoveComments($sScript)
    $sScript = StringRegExpReplace($sScript, '["][^"]*["]|' & "['][^']*[']", "")

    [/autoit] [autoit][/autoit] [autoit]

    Global $aRegExp = StringRegExp($sScript, "(?mis)^\h*func\h+\w+\h*\(.*?^\h*endfunc", 3)
    If @error Or Not IsArray($aRegExp) Then Exit
    Global $aFunc[UBound($aRegExp) + 1][3] = [[UBound($aRegExp)]]

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To $aFunc[0][0]
    $aFunc[$i][0] = $aRegExp[$i - 1]
    $aFunc[$i][1] = StringRegExpReplace($aFunc[$i][0], "(?mis)(^\h*func\h+)(\w+)(\h*\(.*?^\h*endfunc)", "$2")
    $aFunc[$i][2] = False
    If Not $oDict.Exists($aFunc[$i][1]) Then $oDict.Add($aFunc[$i][1], $i)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Global $aTemp, $hItem
    For $i = 1 To $aFunc[0][0]
    $aTemp = $aFunc
    $hItem = _GUICtrlTreeView_Add($hTreeView, 0, $aFunc[$i][1])
    _FindFunctions($aFunc[$i][0], $aFunc[$i][1], $aTemp, $hItem, 1)
    Next

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _GUICtrlTreeView_Expand($hTreeView)

    [/autoit] [autoit][/autoit] [autoit]

    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FindFunctions($sFunc, $sFuncName, $aFunc, $hParent, $iLvl = 0)
    $sFunc = StringRegExpReplace($sFunc, "(?mis)(^\h*func\h+)(\w+)(\h*\(.*?^\h*)(endfunc)", "$3")
    Local $aFuncCall = StringRegExp($sFunc, "(?<![\w\$@])([a-zA-Z_]\w*)(?:\W)", 3)
    If @error Or Not IsArray($aFuncCall) Then Return
    Local $iIndex, $hItem
    For $i = 0 To UBound($aFuncCall) - 1
    If Not $oDict.Exists($aFuncCall[$i]) Then ContinueLoop
    $iIndex = $oDict.Item($aFuncCall[$i])
    If Not $aFunc[$iIndex][2] Then
    $aFunc[$iIndex][2] = True
    If $aFunc[$iIndex][1] = $sFuncName Then
    $hItem = _GUICtrlTreeView_AddChild($hTreeView, $hParent, $aFunc[$iIndex][1] & " ist rekursiv")
    Else
    $hItem = _GUICtrlTreeView_AddChild($hTreeView, $hParent, $aFunc[$iIndex][1])
    _FindFunctions($aFunc[$iIndex][0], $aFunc[$iIndex][1], $aFunc, $hItem, $iLvl + 1)
    EndIf
    EndIf
    Next
    EndFunc ;==>_FindFunctions

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _RemoveComments(ByRef $sScript)
    $sScript = StringRegExpReplace($sScript, '(?x)(?:\r?\n?\s*;.*)|' & '((?>"[^"]*")+|' & "(?>'[^']*')+)", "\1") ;entferne ;-Komments
    $sScript = StringRegExpReplace($sScript, '(?i)(?:[\r\n]\s*)(\#ce|\#comments-end)(.*)', '$1') ;manche #ce haben noch Text dahinter
    $sScript = StringRegExpReplace($sScript, '(?x)(?:\r?\n?\s*;.*)|(?s)\r?\n?\s*\#c(?>s|omments-start)(?>(?>"[^"]*")+|' & "(?>'[^']*')+|.)*?\#c(?>e|omments-end)(?-s)|" & '((?>"[^"]*")+|' & "(?>'[^']*')+)", "\1")
    EndFunc ;==>_RemoveComments

    [/autoit]


    Evtl solltest du _GUICtrlTreeView_Expand($hTreeView) auskommentieren, sonst dauert das unter Umständenen zu lange...


    Edit: Um auch alle #Includes zu berücksichtigen kannst du vorher das hier ausprobieren: Another AutoIt PreProcessor

    E

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™