Sign in to follow this  
Followers 0
acidfear

Is this possible?

13 posts in this topic

#1 ·  Posted (edited)

Is it possible to save a file without opening up a program?

IE. I want to make a program that when i take a normal screenshot (in a game), using hotkeyset it will detect i took a screenshot, but i want it to save the file automatically in a folder i specify (in the program) without opening paint or anything. I know some games already save files in their original folder, but thats not what i want. Plus, i want to learn :D

Thanks for the help in adv.

Edited by acidfear

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i want to learn :D

FileMove("Source","Dest", [Flag])

Flag:

0=Don't overwrite existing files

1=overwrite existing files

:D Lets read the helpfile :wacko: Edited by Paulie

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I did look. But what i DIDN'T know was that the file had already been premade. So i would assume FileMove would be out of the question. But thanks for your help :D!!!

Edited by acidfear

Share this post


Link to post
Share on other sites

opening paint or anything. I know some games already save files in their original folder, but thats not what i want. Plus, i want to learn :D

Take a look at this: http://www.autoitscript.com/forum/index.ph...c=11950&hl=

That script takes a screenshot and saves it somewhere on the disk. If you want to learn how it works, read the source code.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Ok, i got it to take a ss, then save it to a file with dllcall and captdll.dll.

But i cant seem to figure out how to get it to save , when doing a loop, everytime.

And i cant seem to randomize the file name. I tried using math, or random, but it just turns it into an unopenable file.

Share this post


Link to post
Share on other sites

...it just turns it into an unopenable file.

Well make sure that it is saving with an actual file extension

$filename = Random(0000,9999)&".JPG"

or whatever extensions you want to use

Share this post


Link to post
Share on other sites

Thanks Paulie. That solved that problem.

I'm still trying to get it to save everytime it loops. Right now it only saves after the program closes.

Share this post


Link to post
Share on other sites

Anyone? I still haven't found a solution. It only saves after the program closes. I want it to save a file after every loop.

Thanks.

Share this post


Link to post
Share on other sites

Hi,

what about using the freeware tool hardcopy? Or do have to do it in Autoit?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Anyone? I still haven't found a solution. It only saves after the program closes. I want it to save a file after every loop.

Thanks.

Post your code, so we can see what's wrong. I guess, you don't close the file handle in the loop. FileClose(). When the program ends, all file handles will be closed automatically, which might cause the files to actually be written.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Anyone? I still haven't found a solution. It only saves after the program closes. I want it to save a file after every loop.

Thanks.

Have you thought about using Fraps?


Amp Energy Drink: the official sponsor of me scripting at 2AM.

Share this post


Link to post
Share on other sites

Yeah, but Fraps doesn't do exactly what i need it to do.

Share this post


Link to post
Share on other sites

Well, if I'm not mistaken, that part that saves the file is fileclose()

So if you open the file via 'FileOpen()' at the begining of the loop, make a change, then 'FileClose()' it at the end of the loop

does that help any?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0