onilink_ Modérateur
Messages : 9178 Localisation : Montpellier Projet Actuel : Planet Centauri
OniDev
| Sujet: capture d'écrant à la convention MM-DD-YYYY HHMMSS.bmp Sam 20 Déc 2008 - 18:36 | |
| voici un script qui met les captures d'écrants dans une directory renommé aux convention MM-DD-YYYY HHMMSS.bmp trés utile pour un jeux ou le joueur pouras prendre des snapshots - Code:
-
if (current_month < 10) displayMonth = '0' + string(current_month) else displayMonth = string(current_month); if (current_day < 10) displayDay = '0' + string(current_day) else displayDay = string(current_day); if (current_hour < 10) displayHour = '0' + string(current_hour); else displayHour = string(current_hour); if (current_minute < 10) displayMinute = '0' + string(current_minute); else displayMinute = string(current_minute); if (current_second < 10) displaySecond = '0' + string(current_second); else displaySecond = string(current_second); if (! directory_exists(working_directory + '\Screenshots')) directory_create(working_directory + '\Screenshots'); screen_save(working_directory + '\Screenshots\' + string(displayMonth) + '-' + string(displayDay) + '-' + string(current_year) + ' ' + string(displayHour) + string(displayMinute) + string(displaySecond) + '.bmp');
Dernière édition par onilink_ le Sam 20 Fév 2010 - 15:43, édité 1 fois |
|
nicoulas *Excellent utilisateur*
Messages : 6030 Localisation : Dordogne Projet Actuel : Croustaface Tower Defense
| Sujet: Re: capture d'écrant à la convention MM-DD-YYYY HHMMSS.bmp Sam 20 Déc 2008 - 20:27 | |
| Enregistre plutôt en .bmp à la fin parce que de toute façon ton '.png' n'est qu'un bmp renommé en png |
|