Skip to content

overview

These functions are related to the Windows API.

moonlight.windows.directory

Parameters

  • string name

Remarks

  • This will create a directory anywhere on the system.
  • This means, this function does not create a directory in the moonlight folder unless you specify that.
  • https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createdirectorya

moonlight.windows.process

Parameters

  • string cmd

Remarks

  • https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa

moonlight.windows.shell

Parameters

  • string file

Remarks

  • https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea

moonlight.windows.get_module

Parameters

  • string name

Returns

  • number

Remarks

  • https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandlea

moonlight.windows.exit

Remarks

  • Closes CS:GO.

moonlight.windows.key

Parameters

  • number key

Returns

  • boolean - Returns true if the key is down. False otherwise.

Remarks

  • This accepts virtual keys.
  • http://cherrytree.at/misc/vk.htm

moonlight.windows.play_sound

Parameters

  • string file

Remarks

  • Asychronized.
  • This only plays an audio file found in the resources folder.
  • .wav files only.

moonlight.windows.download

Parameters

  • string URL

Returns

  • string - content
  • number - response code

Remarks

  • This will return the webpage's source code as a string.
  • See eula.lua.

moonlight.windows.download_file

Parameters

  • string URL
  • string file

Returns

  • boolean

Remarks

  • This will download the webpage's source code as a string and place it in your "resources" folder.
  • This is different from moonlight.windows.download as this function allows unicode and non-raw input files to be saved.