#Include not including the file
#Include not including the file
Hi all,
I know this question has been posted many times. I've read many threads over last two days trying to solve my issue. But none of the fixes seem to be working for me.
I have a RandomBezier.ahk file saved on my desktop.
I also have a CaveKraken.ahk file saved on my desktop, which has the location in the first line. But I get an error that file can't be opened.
I'm very new so please bare with me.
I know this question has been posted many times. I've read many threads over last two days trying to solve my issue. But none of the fixes seem to be working for me.
I have a RandomBezier.ahk file saved on my desktop.
I also have a CaveKraken.ahk file saved on my desktop, which has the location in the first line. But I get an error that file can't be opened.
I'm very new so please bare with me.
- Attachments
-
- image.png (225.45 KiB) Viewed 583 times
Last edited by goku usa on 23 Jan 2022, 14:26, edited 1 time in total.
Re: #Include not including the file
You can use FileExist to see whether the file is found. If you saved the file to the common desktop instead of the user desktop, then the file will be in a different directory.
Re: #Include not including the file
ur RandomBezier.ahk is actually probably RandomBezier.ahk.txt....
Re: #Include not including the file
My Notepad displays the complete file name in the window title bar, but looking at both of the Notepad windows displayed in the post, it looks like you may be right! Easy test: check File Explorer for both the path and the complete file name.
Re: #Include not including the file
And when checking File Explorer, if your settings are to not show file extensions as I believe is weirdly the default setting, then look in the “Type” column and see whether it says “AutoHotkey Script” or “Text Document.”
Re: #Include not including the file
Code: Select all
Loop, Files, %A_Desktop%\RandomBezier*.*
MsgBox, % "Its name is actually " . A_LoopFileName
return
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
Re: #Include not including the file
Or:
Code: Select all
mask = RandomBezier*.*
For each, dir in [A_Desktop, A_DesktopCommon]
Loop, Files, %dir%\%mask%
MsgBox, Its path is actually:`n`n%A_LoopFilePath%
Return
Re: #Include not including the file
Yes, that is more reliable .
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
Re: #Include not including the file
I would hope no one would use that solution. Rather then change your script to include the file RandomBezier.ahk.ahk, you should rename the file to just RandomBezier.ahk. Again, you probably have it so that your files are displayed without extensions, so you don’t see what the full file name actually is.
Re: #Include not including the file
@goku usa, just run this script:
Code: Select all
FileMove, %A_Desktop%\RandomBezier*.*, %A_Desktop%\RandomBezier.ahk
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.