Sign in to follow this  
Followers 0
briancaulkins

Folder exists

10 posts in this topic

#1 ·  Posted (edited)

Topic should have been named Registry Exists. Sorry.

Hi, I've looked through the help file and couldn't find a function that would tell me if a registry entry exists. I thought I saw it in the forums but I don't remember where I found it. Could someone help?

Brian

Edited by briancaulkins

Share this post


Link to post
Share on other sites



Hi, I've looked through the help file and couldn't find a function that would tell me if a registry entry exists. I thought I saw it in the forums but I don't remember where I found it. Could someone help?

Brian

RegRead()?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

RegRead()?

So could I do something like this,

If RegRead=(specific registry key) Then...

and it will do one thing if it matches the registry key or do another if it doesn't? Will that work?

Thanks for the reply.

Brian

Share this post


Link to post
Share on other sites

So could I do something like this,

If RegRead=(specific registry key) Then...

and it will do one thing if it matches the registry key or do another if it doesn't? Will that work?

Thanks for the reply.

Brian

Always one way to find out :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Always one way to find out :)

Good point :) Was just wondering if there was a better way of doing it.

Brian

Share this post


Link to post
Share on other sites

What better way of doing it?

If RegRead("regkey") Then $exists = true

Reading it would return anything there, if it doesn't exist, then there is nothing to read =P


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

DirGetSize() returns 0 if it doesn't exist.

Share this post


Link to post
Share on other sites

DirGetSize() returns 0 if it doesn't exist.

:) On a registry key? :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Oops, I read the topic, it sounded like he needed to check if a FOLDER exists, his topic title is misleading... :)

Share this post


Link to post
Share on other sites

DirGetSize() returns 0 if it doesn't exist.

FileExists() also works on folders :)

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