Allright as I said everything you need is in the Macro section of this very wesite, but I will try to give you an answer you can use. There are two ways to macro, by loading an alias, and by using the built in macro in game.
I believe that the loaded macros in general are easier to write and edit, and can allow a character to complete a much more complex yet repetative actions. If your only intent is to sample and that is it either will work just fine.
I will mention that the bonus to using the in game macro system is that you can work on the macro as you play and if it is doing something you don't want it to you can change it with out exiting the game. With a loaded macro you must exit and turn the game completely off before writing and or changing the Macros text which allows it to function.
To sample in game you need to first open the macro editor on the toolbar, it kind of looks like fireworks or a fountain and is two or three keys from the right on the tool/task bar at the bottom of the screen.
After opening the macro tab push the button that reads new macro,
then name your macro with nospaces in the topline. Then pick a symbol for your macro, then in the text area below the symbols type your commands make sure each command starts with ''//'' and ends with a '';;''.
I am at work so I can't give you specifically the Macro I use, but here is one that should work just as well
/sample 3000;/stand;/pause 100;
/sample 3000;/stand;/pause 300;
/ui action toolbar00;
the ui action toolbar is what loops it back to the firts Function key at the top of the scree.
save and close the macro editor and the symbol you picked with the name you picked should appear in your list of macros. Then drag the macro symbol to an empty Function tool bar at the top of the screen and plae it in the first function key position.
When you are ready to begin sampling push the macro key. When you are ready to quit the macro drag it from the first function key and intoany other position on the function toolbar and the macro will quite running.
1st Make sure you have surveyd the spot you want, and that you are on a large percentage deposit before leaving your character to sample. The higher the percentage of the ore beneath your feet the more often your sampling will be succesful and the more experience you will get. I suggest a minimum of 60% or more.
2nd watch your macro work the first time untill it has cycled through its functions one complete time to make sure it is working apropriately. If your character is sampling to long or taking pauses between sampling to long just go back to the Macro editor and edit the numbers in your macro text which represent the number of seconds you are perfoming that function. If you pausing or sampleing to long decrease the number, and if you are not sampling or resting long enough increase the number. How long you are able to sustain sampling and then how long you need to rest between sampling is really dependent upon the characters indiviual HAM scores so you may very well have to change the time lengths.
I hope this helps, if you need more information I am going to have to defer to the Macro section under GAME Guides in this website, where there are lots of very good Macros that work to do just what you want. If your macro doesn't work the first time continue to tweek it till it works. That first one is always difficult to write and implement, but after you get it your next macro will be even easier to write. One hour writing and implementing a good macro will save you hundreds of tedious hours pressing sample and watching your character bend over and play in the Dirt.
If that is what you enjoy doing however feel free to continue playing in the dirt but do me a favor and when other chacters ask you how you like the game tell them that You Love "StarGeoligists" a pebble divided, and don't give me any flac about macroing the tedium.
Sorry about the offshooting soapbox bullypulpitting Filabusting Tnatrum, but we should all be left to play this game as we see fit, upto the acception of taking that right from another palyer.
So in Short Use your Macro, Love Your Macro, but always try to macro in low trafic areas so you don't lag down the players who are activelyplaying the game.
"G"
-The Wordiest Fool you'll ever meet-