Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Code Submission Guidelines


  • Please log in to reply
2 replies to this topic

#1 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 21 December 2003 - 08:02 PM

The following text is by Jon, but it ended up getting deleted. I'm putting here so I it won't be lost :whistle:

Code_Submission_Spec Orginally from here
Plain Text         
This file contains instructions on submitting code for AutoIt, it helps me if code is submitted like this due to my lack of free time at the moment.  Code submitted like this will take precedence over any code that I need to windiff or think about! Note, try and keep code in the same style as the existing sources, taking note of naming, layout and style conventions - even if you disagree with the conventions;) Consistancy is everything! 1. Create a text file containing all the changes to the source files you have made    (See Code_Specification_Example.txt for an example by Larry).  Try and use the latest    version of the sources as a comparision to aid me. 2. Modify/create the relevant html help pages 3. Compile your code into AutoIt3-test.exe 4. Create a test.au3 script that demonstrates the new/changed feature 5. Create a zipfile called "AU3-myname-date.zip" that contains:     - AutoIt3-test.exe     - test.au3     - all modified script files (script.cpp, script_misc.cpp, etc.)     - Changes.txt (as per the Code_Specification_Example.txt above)     - Modified/created html files 6. send to support@hiddensoft.com titled "AutoIt Code Submission" If you don't get a reply with a week then send a reminder.  It's hard keeping track of all the emails I get and I'm a little busy with RL/Work stuff these days :( Thanks, Jon.


Code_Submission_Example Orginally from here
Plain Text         
Functionality -------------- This adds FileFindFirstFile and FileFindNextFile Based on sources ---------------- v3.0.69 *********************************************************** ******************* script.cpp *********************************************************** in Constructor() add // Initialise file handles to NULL m_hFileHandle = NULL; in Destructor() add // Close any file handles that script writer has not close (naughty!) if (m_hFileHandle != NULL)      FindClose(m_hFileHandle); to functions list add "FileFindFirstFile", "FileFindNextFile" to parameters list add {1,1}, {0,0} to giant case structure add case F_FINDFIRSTFILE:      return FileFindFirstFile(vParams[0].szValue(), vResult); case F_FINDNEXTFILE:      return FileFindNextFile(vResult); *********************************************************** ****************** script.h *********************************************************** add F_FINDFIRSTFILE, F_FINDNEXTFILE add HANDLE                   m_hFileHandle;           // File Handle for Find File functions add AUT_RESULT     FileFindFirstFile(const char *szFile, Variant &vResult); AUT_RESULT     FileFindNextFile(Variant &vResult); *********************************************************** ***************** script_file.cpp *********************************************************** /////////////////////////////////////////////////////////////////////////////// // FileFindFirstFile(<file>) // Returns the first file found according to <file> search string. /////////////////////////////////////////////////////////////////////////////// AUT_RESULT     AutoIt_Script::FileFindFirstFile(const char *szFile, Variant &vResult) {           WIN32_FIND_DATA          wfd;           HANDLE                   hFile;           hFile = FindFirstFile(szFile, &wfd);           if ( hFile == INVALID_HANDLE_VALUE )           {                SetFuncErrorCode(1);                return AUT_OK;           }           m_hFileHandle = hFile;           vResult = wfd.cFileName;           return AUT_OK; } // FileFindFirstFile() /////////////////////////////////////////////////////////////////////////////// // FileFindNextFile(<file>) // Returns the next file found according to a previous call to FileFindFirstFile. /////////////////////////////////////////////////////////////////////////////// AUT_RESULT     AutoIt_Script::FileFindNextFile(Variant &vResult) {           WIN32_FIND_DATA          wfd;           if ( m_hFileHandle == NULL )           {                SetFuncErrorCode(1);                return AUT_OK;           }           if ( !FindNextFile(m_hFileHandle, &wfd) )           {                SetFuncErrorCode(1);                FindClose(m_hFileHandle);                m_hFileHandle = NULL;           }           else                vResult = wfd.cFileName;           return AUT_OK; } // FileFindNextFile()

Edited by CyberSlug, 21 December 2003 - 08:08 PM.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!







#2 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 10,630 posts

Posted 21 December 2003 - 08:36 PM

Excellent. Thanks. :whistle:

#3 spt

spt

    Seeker

  • Active Members
  • 21 posts

Posted 09 January 2004 - 03:48 AM

hehe nice, problem is i dont really know much more than basic C++ commands such as cout, cin, and stuff like that.. :whistle:
~~ Safeguarding The Land ~~Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users