The Ctrl+V Game

Things that are not directly connected with Factorio.
MrDrummer
Fast Inserter
Fast Inserter
Posts: 132
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Re: The Ctrl+V Game

Post by MrDrummer »

Just some random code from my Python Program.

Code: Select all

import os, time, glob, pickle
while chosen==0:
     print("1. New file")
     print("2. Open existing file")
     neworopen=input()
     if neworopen=="1":#new file name
          print("Enter name of new file")
          chosenname=input()
          chosenname=chosenname+".txt"
          print(chosenname)
          var=glob.glob("*.txt")
          if any(x in chosenname for x in var):#checks every value in the list 'scripts'
               print("Name taken.")#if there is a match, it loops.
          else:#otherwise it creates a file with that new name.
               print("File created with the name '"+ chosenname+"'.")
               print("")
               filename=chosenname
               chosen=1
     elif neworopen=="2":#open prev file
          print("Enter the name of the file to open")
          print(glob.glob("*.txt"))#lists all txt files in directory of script
          var=glob.glob("*.txt")
          chosenname=input()
          chosenname=chosenname+".txt"
          if any(x in chosenname for x in var):#checks every value in the list 'scripts'
               print("You have selected the file with the name '"+ chosenname+"'.")
               print("")
               filename=chosenname
               chosen=1
          else:
               print("No such file with that name exists.")
               print("Select '1' to create a new file.")
               print("")
Explanation:
I originally designed this for an idea i had for an LED ordered/recorded script - so you enter which LEDs you want on at what point (per 0.5 seconds) and then it records it in a text file.

Basically, in the folder that the script is in, it creates the .txt file that it records to. And the glob library does that nicely.
This also avoids the user picking a name that already exists :)

I was copying this into a new program, because i simply loved my concept, and wanted to use it for another project i am working on. :)
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: The Ctrl+V Game

Post by ssilk »

Code: Select all

LAR
Summary
LAR stands for Lua ARchive, and consist of a module and a file format that empowers a lua script to load lua modules from within a packaged, compressed file.
It is, in short, a virtual file system for Lua using ZIP compression.
LAR is, in several ways, similar to JAR, except it can be used without specialized tool suport.
http://www.keplerproject.org/en/LAR
Looking around for a way to read contents of packed modules without unpacking for https://github.com/alexaulbach/FactorioLoaderLib
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
NotMe
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Dec 20, 2014 10:06 pm
Contact:

Re: The Ctrl+V Game

Post by NotMe »

The rocket launcher is not underpowered. It is useless.
User avatar
Nova
Filter Inserter
Filter Inserter
Posts: 959
Joined: Mon Mar 04, 2013 12:13 am
Contact:

Re: The Ctrl+V Game

Post by Nova »

circumstances


(I did need the english word for the german "Umstände", and Google translate did give me this.)


@NotMe: Well, it is nice that someone copied my text, was a real suprise to read it here. :D
User avatar
-root
Filter Inserter
Filter Inserter
Posts: 651
Joined: Tue Jul 01, 2014 11:24 pm
Contact:

Re: The Ctrl+V Game

Post by -root »

User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: The Ctrl+V Game

Post by Phillip_Lynx »

Code: Select all

[quote="abnormalgamer"]
For posting purposes
User avatar
Xecutor
Filter Inserter
Filter Inserter
Posts: 260
Joined: Mon Jun 23, 2014 10:15 am
Contact:

Re: The Ctrl+V Game

Post by Xecutor »

Code: Select all

  {
    type = "item-subgroup",
    name = "barrel",
    group = "intermediate-products",
    order = "d"
  },
hm....
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: The Ctrl+V Game

Post by Nirahiel »

Cause you could make a bishop
For a video game xD
User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: The Ctrl+V Game

Post by Phillip_Lynx »

Code: Select all

Phillip Lynx bekommt: Wolfszahnkette
From an browser game
Snowpig
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Jan 16, 2015 8:43 am
Contact:

Re: The Ctrl+V Game

Post by Snowpig »

(empty)

dang, i should start working :cry:
Gammro
Filter Inserter
Filter Inserter
Posts: 361
Joined: Wed Oct 09, 2013 1:45 pm
Contact:

Re: The Ctrl+V Game

Post by Gammro »

Code: Select all

1.68/(10^8)
Which is the resistivity of copper. At least it's something related to work :P
Ignore this
User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: The Ctrl+V Game

Post by Phillip_Lynx »

http://www.floomby.com/s1/Peu2Bk

wich is a picture from a browsergame.
User avatar
bastrath
Inserter
Inserter
Posts: 24
Joined: Tue Jan 06, 2015 4:58 pm
Contact:

Re: The Ctrl+V Game

Post by bastrath »

train conductor

Wasn't sure about a translation for my signatur. In fact, this confirms it (the signatur) ^^
Maybe my english isn's good, but compared to our train conductors my english is high level (Sänk ju for träwelink wiss deutsche Bahn!)
User avatar
Darthlawsuit
Fast Inserter
Fast Inserter
Posts: 247
Joined: Thu Feb 28, 2013 7:32 pm
Contact:

Re: The Ctrl+V Game

Post by Darthlawsuit »

Image
SNORKOFOB
Inserter
Inserter
Posts: 28
Joined: Sun Feb 08, 2015 2:23 pm
Contact:

Re: The Ctrl+V Game

Post by SNORKOFOB »

Dr. RPgK сменил имя на Mr. Dr. RPgK.
Dont ask what that means :|
Яussian inseяteя.
User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 565
Joined: Sat May 10, 2014 7:20 am
Contact:

Re: The Ctrl+V Game

Post by Kayanor »

RDP-Zwischenablagenüberwachung

Something I found in Windows' task manager :D
Former moderator
onebit
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Mon Feb 02, 2015 4:32 pm
Contact:

Re: The Ctrl+V Game

Post by onebit »

Image
User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: The Ctrl+V Game

Post by Phillip_Lynx »

[Off Topic]
Nice Layout
[/Off Topic]

https://www.youtube.com/watch?v=0N-jXRt ... _ighOcx9QZ_

german Lets play of craft the world. Needed the copy for another Tab :)
kel
Inserter
Inserter
Posts: 28
Joined: Sat Feb 14, 2015 3:25 pm
Contact:

Re: The Ctrl+V Game

Post by kel »

Code: Select all

        //errorhandeler
        if (choice == 'y') {
            
        } else if (choice == 'n') {
            System.exit(0);
        } else {
            printconsole("invalid answer; defaulting to ''yes'' (y)");
        }
        
        }

        catch(Exception e){

        }

      
Locked

Return to “Off topic”