Author Topic: ULX custom command  (Read 1724 times)

0 Members and 1 Guest are viewing this topic.

Offline CheeseSalt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
ULX custom command
« on: January 09, 2015, 03:06:58 PM »
I was trying to figure out how to make a command that when you type "!textures" would either copy a link to your clip board and say "Link copied to clipboard" or it would open the page in the steam browser. I have no idea how i would do this, if anybody could help that would be much appreciated!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX custom command
« Reply #1 on: January 09, 2015, 03:20:42 PM »
Do you know lua?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline CheeseSalt

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: ULX custom command
« Reply #2 on: January 09, 2015, 03:35:20 PM »
Bits and peices im not great at it. I do have a friend who could help me.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: ULX custom command
« Reply #3 on: January 09, 2015, 07:40:03 PM »
gui.OpenURL() is your friend.
You'd probably also want to use the Net library, as gui.OpenURL() is a client-side function.

You can check out my ULX command template for a base on which to write your code.
« Last Edit: January 09, 2015, 11:26:15 PM by Bytewave »
bw81@ulysses-forums ~ % whoami
Homepage

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX custom command
« Reply #4 on: January 09, 2015, 10:06:02 PM »
http://wiki.garrysmod.com/page/Global/SetClipboardText

You can also use this (clientside) to set a players clipboard.