Jump to content

Search the Community

Showing results for tags 'Windows Problem'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hey Every1!!!!!! I have made a Func to get all the files in the Directory Mentioned , The Func even checks the Sub-Directory for the Files.................... I am Having Windows 7 32 Bit........... I know that i can get if it is a Directory using @extended Macro But ANyways i tried my own way........... So If i declare the Variable $RealFile as Local , Everything Just Works Awesome just the value of the Variable Resets upon calling the Variable again Therefore I declared the Variable as Global ........ Here the Problem Izzzzzzz Whenever I declare the Var as GLobal .............and run it a message comes up saying 'Autoit v3 Script has stopped working' Thats It the Script Exits.............. I'm Just not getting It Why the Hell isnt it working......... Here is a image of the error i get 'IMAGE' The Code is just The Following #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=X.exe #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt('TrayIconDebug',1) Global $NumberOfFiles=1,$x=FileSelectFolder('Heya',''),$RealFile[$NumberOfFiles] Global $eXt='*.mp3' Global $glo=_ListFiles_SubDirectory($x,$eXt) For $i=1 To UBound($glo)-1 FileWriteLine('Abhishek.txt',$glo[$i]) Next Func _ListFiles_SubDirectory($folder,$Pattern='*.*',$SubFolder=1) Dim $Search _CheckSlash($folder) $Search=FileFindFirstFile($folder&'*.*') If @error Then ConsoleWrite($folder&" Doesn't Contain Any Files"&@CRLF) #cs Checking For All The Files So That It can Be Figured Out ,If Not Even A Single File Of The Mathcing Pattern Is Present #ce While $search<>-1 $RealFile[0]=FileFindNextFile($Search) If @error Then ExitLoop If IsDirectory($folder&$RealFile[0]) Then ReDim $RealFile[$NumberOfFiles+1] Local $z=$NumberOfFiles $RealFile[$NumberOfFiles]=_ListFiles_SubDirectory($folder&$RealFile[0],$Pattern) ConsoleWrite('Listed: '&$folder&$RealFile[$x]&@CRLF) $NumberOfFiles+=1 EndIf WEnd FileClose($search) #cs The Part Of The Func Which Does The Main Role Is Just The Following #ce If IsArray($Pattern) Then For $x In $Pattern $Search=FileFindFirstFile($folder&$x) While $search<>-1 ReDim $RealFile[$NumberOfFiles+1] $RealFile[$NumberOfFiles]=FileFindNextFile($Search) If @error Then ExitLoop EndIf ConsoleWrite('Found: '&$RealFile[$NumberOfFiles]&@CRLF) $NumberOfFiles+=1 WEnd Next Else $Search=FileFindFirstFile($folder&$Pattern) While $search<>-1 ReDim $RealFile[$NumberOfFiles+1] $RealFile[$NumberOfFiles]=FileFindNextFile($Search) If @error Then ExitLoop EndIf ConsoleWrite('Found: '&$folder&$RealFile[$NumberOfFiles]&@CRLF) $NumberOfFiles+=1 WEnd EndIf FileClose($search) Return $RealFile EndFunc Func IsDirectory($folder) If Not FileExists($folder) Then Return -1 Local $Directory=StringInStr(FileGetAttrib($folder),'D',2) If $Directory<>0 Then Return 1 Return 0 EndFunc Func _checkslash(ByRef $2check) If StringRight($2check,1)<>"" Then $2check&="" Return 1 EndFunc If any1 here knows the possible solution of the Problem Plz Reply to me Thnx In Advance Regards PhoenixXL
×
×
  • Create New...